Add Schmitt SPI display driver
This commit is contained in:
parent
26fe6e7703
commit
8592cb9d29
9 changed files with 72 additions and 3 deletions
27
lvgl_tft/schmitt.c
Normal file
27
lvgl_tft/schmitt.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "schmitt.h"
|
||||
#include "disp_spi.h"
|
||||
|
||||
#include "esp_log.h"
|
||||
|
||||
static const char* TAG = "SCHMITT_DIS";
|
||||
|
||||
void schmitt_init(void)
|
||||
{
|
||||
disp_spi_acquire();
|
||||
// Do things
|
||||
ESP_LOGI(TAG, "schmitt_init() called");
|
||||
disp_spi_release();
|
||||
}
|
||||
|
||||
void schmitt_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map)
|
||||
{
|
||||
disp_spi_acquire();
|
||||
// Do things
|
||||
uint32_t size = lv_area_get_width(area) * lv_area_get_height(area);
|
||||
disp_spi_send_colors(color_map, size * 4);
|
||||
ESP_LOGI(TAG, "schmitt_flush() called");
|
||||
disp_spi_release();
|
||||
lv_disp_flush_ready(drv);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue