Files
iroBotAMOLED_Test/main/config/display_config.h
Neil Arora 8aeaed8a15 Refactor project structure and update display logic
Reorganized source files into new directories for config, drivers, sensors, emotion engine, and UI. Removed legacy assets and code related to previous eye animation implementation. Added new display and touch drivers, emotion manager, shake detector, and UI components. Updated CMake project name to 'irobot_display'.
2026-01-24 15:21:50 +05:30

84 lines
2.4 KiB
C

/**
* @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