@@ -11,7 +11,7 @@ Implementation of the AXS15231B LCD & Touch controller with esp_lcd component.
1111## Add to project
1212
1313Packages from this repository are uploaded to [ Espressif's component service] ( https://components.espressif.com/ ) .
14- You can add them to your project via ` idf.py add-dependancy ` , e.g.
14+ You can add them to your project via ` idf.py add-dependency ` , e.g.
1515```
1616 idf.py add-dependency esp_lcd_axs15231b==1.0.0
1717```
@@ -128,8 +128,8 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
128128
129129 ESP_LOGI(TAG, "Install panel IO");
130130 esp_lcd_panel_io_handle_t io_handle = NULL;
131- const esp_lcd_panel_io_spi_config_t io_config = ILI9341_PANEL_IO_SPI_CONFIG (EXAMPLE_PIN_NUM_LCD_CS, EXAMPLE_PIN_NUM_LCD_DC,
132- example_callback, &example_callback_ctx);
131+ const esp_lcd_panel_io_i80_config_t io_config = AXS15231B_PANEL_IO_I80_CONFIG (EXAMPLE_PIN_NUM_LCD_CS, EXAMPLE_PIN_NUM_LCD_DC,
132+ example_callback, &example_callback_ctx);
133133 ESP_ERROR_CHECK(esp_lcd_new_panel_io_i80(i80_bus, &io_config, &io_handle));
134134
135135/**
@@ -181,7 +181,11 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
181181 ESP_ERROR_CHECK(esp_lcd_new_panel_io_dbi(mipi_dsi_bus, &dbi_config, &mipi_dbi_io));
182182
183183 ESP_LOGI(TAG, "Install AXS15231B panel driver");
184+ #if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(6, 0, 0)
184185 esp_lcd_dpi_panel_config_t dpi_config = AXS15231B_240_960_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_PIXEL_FORMAT_RGB888);
186+ #else
187+ esp_lcd_dpi_panel_config_t dpi_config = AXS15231B_240_960_PANEL_60HZ_DPI_CONFIG_CF(LCD_COLOR_PIXEL_FORMAT_RGB888);
188+ #endif
185189 axs15231b_vendor_config_t vendor_config = {
186190 .flags = {
187191 .use_mipi_interface = 1,
@@ -207,6 +211,8 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
207211
208212```
209213 esp_lcd_panel_io_i2c_config_t io_config = ESP_LCD_TOUCH_IO_I2C_AXS15231B_CONFIG();
214+ esp_lcd_panel_io_handle_t io_handle = NULL;
215+ ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(i2c_bus_handle, &io_config, &io_handle));
210216
211217 esp_lcd_touch_config_t tp_cfg = {
212218 .x_max = CONFIG_LCD_HRES,
@@ -225,7 +231,7 @@ Alternatively, you can create `idf_component.yml`. More is in [Espressif's docum
225231 };
226232
227233 esp_lcd_touch_handle_t tp;
228- esp_lcd_touch_new_i2c_axs15231b(io_config , &tp_cfg, &tp);
234+ esp_lcd_touch_new_i2c_axs15231b(io_handle , &tp_cfg, &tp);
229235```
230236
231237Read data from the touch controller and store it in RAM memory. It should be called regularly in poll.
0 commit comments