rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
355 stars 67 forks source link

SWAP 16 LSB first flag for SPI? #97

Open rzeldent opened 6 months ago

rzeldent commented 6 months ago

esp_lcd_panel_io_i80_config_t io_config = { .cs_gpio_num = EXAMPLE_PIN_NUM_CS, .pclk_hz = EXAMPLE_LCD_PIXEL_CLOCK_HZ, .trans_queue_depth = 10, .dc_levels = { .dc_idle_level = 0, .dc_cmd_level = 0, .dc_dummy_level = 0, .dc_data_level = 1, }, .flags = { .swap_color_bytes = !LV_COLOR_16_SWAP, // Swap can be done in LvGL (default) or DMA },

struct { unsigned int dc_as_cmd_phase: 1; /!< D/C line value is encoded into SPI transaction command phase / unsigned int dc_low_on_data: 1; /!< If this flag is enabled, DC line = 0 means transfer data, DC line = 1 means transfer command; vice versa / unsigned int octal_mode: 1; /!< transmit with octal mode (8 data lines), this mode is used to simulate Intel 8080 timing / unsigned int lsb_first: 1; /!< transmit LSB bit first / } flags; /!< Extra flags to fine-tune the SPI device /

rzeldent commented 5 months ago

This might be easier than manipulating for the LV_COLOR_16_SWAP flag