# esp_lcd_more_autonomy
Enhanced MIPI DSI LCD driver component for ESP32-P4.
## Why
The stock `esp_lcd` component hardcodes several DSI configuration choices
that some display controllers need to override:
| Issue | Default (esp_lcd) | more_lcd |
|-------|-------------------|----------|
| DBI command type | DCS write only | DCS **or** Generic write (configurable) |
| DPI clock lane | AUTO (stops during blanking) | AUTO / HS / LP (configurable) |
| Timing polarity | Hardcoded low-active | Configurable per signal |
| Command ACK | Always enabled | Optional disable |
These are exactly the settings needed for **ILI9883C-X1** (YTS430KLAK-01)
and similar DSI display controllers that use proprietary register pages
(0xFF page switching) and require continuous HS clock.
## Usage
```c
#include "esp_lcd_more_autonomy.h"
// 1. Create DSI bus
more_lcd_dsi_bus_handle_t bus;
more_lcd_new_dsi_bus(&(esp_lcd_dsi_bus_config_t){
.bus_id = 0,
.num_data_lanes = 2,
.lane_bit_rate_mbps = 480,
.phy_clk_src = MIPI_DSI_PHY_CLK_SRC_DEFAULT,
}, &bus);
// 2. Create DBI command IO — use Generic data type for non-standard ICs
more_lcd_dbi_io_handle_t dbi;
more_lcd_new_panel_io_dbi(bus, &(more_lcd_dbi_io_config_t){
.virtual_channel = 0,
.lcd_cmd_bits = 8,
.lcd_param_bits = 8,
.data_type = MORE_LCD_DSI_DATA_TYPE_GENERIC,
.disable_cmd_ack = true,
}, &dbi);
// 3. Send init sequence via DBI
more_lcd_panel_io_dbi_tx_param(dbi, 0xFF, (uint8_t[]){0x98, 0x83, 0x01}, 3);
// ...
// 4. Create DPI panel with continuous HS clock
more_lcd_dpi_panel_handle_t dpi;
more_lcd_new_panel_dpi(bus, &(more_lcd_dpi_panel_config_t){
.virtual_channel = 0,
.dpi_clock_freq_mhz = 24,
.pixel_format = LCD_COLOR_PIXEL_FORMAT_RGB888,
.clock_lane_state = MORE_LCD_CLOCK_LANE_HS,
.video_timing = {
.h_size = 480, .v_size = 800,
.hsync_pulse_width = 20, .hsync_back_porch = 5, .hsync_front_porch = 20,
.vsync_pulse_width = 20, .vsync_back_porch = 20, .vsync_front_porch = 20,
},
}, &dpi);
// 5. Init (enables video with HS clock)
more_lcd_panel_init(dpi);
// 6. Draw
more_lcd_panel_draw_bitmap(dpi, 0, 0, 480, 800, frame_buffer);
```
## Dependencies
- ESP-IDF >= 5.0 (tested on 5.5.1)
- Target: esp32p4
## ESP Registry
To add this component to your project via the ESP Component Registry:
```yaml
# idf_component.yml
dependencies:
esp_lcd_more_autonomy:
version: ">=0.1.0"
```
Or use directly from git:
```yaml
dependencies:
esp_lcd_more_autonomy:
git: https://github.com/Martlet-Tech/esp_lcd_more_autonomy.git
path: components/esp_lcd_more_autonomy
```
idf.py add-dependency "martlet-tech/esp_lcd_more_autonomy^0.1.1"