/** * @file display_config.h * @brief Display configuration constants for the iroBot display system * * This header centralizes all LCD and LVGL configuration parameters. * Modify these values to adapt to different display hardware. */ #ifndef DISPLAY_CONFIG_H #define DISPLAY_CONFIG_H #include "driver/gpio.h" #ifdef __cplusplus extern "C" { #endif // ---------------------------------------------------------------------------- // LCD Resolution // ---------------------------------------------------------------------------- #define DISPLAY_WIDTH 368 #define DISPLAY_HEIGHT 448 // ---------------------------------------------------------------------------- // LCD SPI Pin Configuration // ---------------------------------------------------------------------------- #define LCD_PIN_CS (GPIO_NUM_12) #define LCD_PIN_PCLK (GPIO_NUM_11) #define LCD_PIN_DATA0 (GPIO_NUM_4) #define LCD_PIN_DATA1 (GPIO_NUM_5) #define LCD_PIN_DATA2 (GPIO_NUM_6) #define LCD_PIN_DATA3 (GPIO_NUM_7) #define LCD_PIN_RST (-1) #define LCD_PIN_BACKLIGHT (-1) // ---------------------------------------------------------------------------- // LCD Backlight Control // ---------------------------------------------------------------------------- #define LCD_BACKLIGHT_ON_LEVEL 1 #define LCD_BACKLIGHT_OFF_LEVEL (!LCD_BACKLIGHT_ON_LEVEL) // ---------------------------------------------------------------------------- // SPI Host Configuration // ---------------------------------------------------------------------------- #define LCD_SPI_HOST SPI2_HOST // ---------------------------------------------------------------------------- // Color Depth Configuration // ---------------------------------------------------------------------------- #if CONFIG_LV_COLOR_DEPTH == 32 #define LCD_BIT_PER_PIXEL 24 #elif CONFIG_LV_COLOR_DEPTH == 16 #define LCD_BIT_PER_PIXEL 16 #endif // ---------------------------------------------------------------------------- // LVGL Configuration // ---------------------------------------------------------------------------- // Draw buffer height as a fraction of display height (1/4 of screen) #define LVGL_BUFFER_HEIGHT (DISPLAY_HEIGHT / 4) // LVGL tick period in milliseconds #define LVGL_TICK_PERIOD_MS 2 // LVGL task timing constraints #define LVGL_TASK_MAX_DELAY_MS 500 #define LVGL_TASK_MIN_DELAY_MS 1 // LVGL task configuration #define LVGL_TASK_STACK_SIZE (4 * 1024) #define LVGL_TASK_PRIORITY 2 #ifdef __cplusplus } #endif #endif // DISPLAY_CONFIG_H