| 57 | } |
| 58 | |
| 59 | bool St7789i8080Display::createI80Bus() { |
| 60 | LOGGER.info("Creating I80 bus"); |
| 61 | |
| 62 | // Create I80 bus configuration |
| 63 | esp_lcd_i80_bus_config_t bus_cfg = { |
| 64 | .dc_gpio_num = configuration.dcPin, |
| 65 | .wr_gpio_num = configuration.wrPin, |
| 66 | .clk_src = LCD_CLK_SRC_DEFAULT, |
| 67 | .data_gpio_nums = { |
| 68 | configuration.dataPins[0], configuration.dataPins[1], |
| 69 | configuration.dataPins[2], configuration.dataPins[3], |
| 70 | configuration.dataPins[4], configuration.dataPins[5], |
| 71 | configuration.dataPins[6], configuration.dataPins[7], |
| 72 | }, |
| 73 | .bus_width = configuration.busWidth, |
| 74 | .max_transfer_bytes = configuration.bufferSize * sizeof(uint16_t), |
| 75 | .psram_trans_align = 64, |
| 76 | .sram_trans_align = 4 |
| 77 | }; |
| 78 | |
| 79 | esp_err_t ret = esp_lcd_new_i80_bus(&bus_cfg, &i80BusHandle); |
| 80 | if (ret != ESP_OK) { |
| 81 | LOGGER.error("Failed to create I80 bus: {}", esp_err_to_name(ret)); |
| 82 | return false; |
| 83 | } |
| 84 | |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | bool St7789i8080Display::createPanelIO() { |
| 89 | LOGGER.info("Creating panel IO"); |