Add LVGL and set up with display/touch drivers

This commit is contained in:
maddiebaka
2025-12-26 11:04:16 -05:00
parent cb92f69ee3
commit 3256ab2e65
7 changed files with 269 additions and 58 deletions
+9 -12
View File
@@ -4,17 +4,14 @@
#include "esp_lcd_panel_io.h"
#define LCD_SPI_HOST SPI2_HOST
#define LCD_SPI_HOST SPI2_HOST
#define TOUCH_SPI_HOST SPI3_HOST
#define GPIO_TFT_MISO CONFIG_TFT_MISO_PIN
#define GPIO_TFT_MOSI CONFIG_TFT_MOSI_PIN
#define GPIO_TFT_SCKL CONFIG_TFT_SCKL_PIN
#define GPIO_TFT_CS CONFIG_TFT_CS_PIN
#define GPIO_TFT_DC CONFIG_TFT_DC_PIN
#define GPIO_TFT_BL CONFIG_TFT_BL_PIN // Backlight
#define TFT_HRES CONFIG_TFT_HRES
#define TFT_VRES CONFIG_TFT_VRES
#define TFT_BPP CONFIG_TFT_BPP
#define TFT_HRES CONFIG_TFT_HRES
#define TFT_VRES CONFIG_TFT_VRES
#define TFT_BPP CONFIG_TFT_BPP
#define LVGL_BUF_SIZE TFT_VRES * TFT_HRES / 10 * (TFT_BPP / 8)
/**
* Draws a test bitmap of stripes of colors to the LCD.
@@ -22,6 +19,6 @@
void test_draw_bitmap(esp_lcd_panel_handle_t panel_handle);
/**
* Initializes the SPI LCD in preparation for writing graphics to it.
* Initializes the display TFT and touchscreen.
*/
void init_spi_lcd(void);
void init_display(void);