feat(ssd1306): Add vendor specific configuration for SSD1306

Merges https://github.com/espressif/esp-idf/pull/12450
This commit is contained in:
Alexey Storozhev
2023-10-23 13:45:02 +01:00
committed by morris
parent 5d02e71972
commit c4dc16c612
3 changed files with 75 additions and 1 deletions

View File

@@ -99,6 +99,14 @@ void app_main(void)
.reset_gpio_num = EXAMPLE_PIN_NUM_RST,
};
#if CONFIG_EXAMPLE_LCD_CONTROLLER_SSD1306
#if EXAMPLE_LCD_V_RES != 64
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
.mux_ratio = EXAMPLE_LCD_V_RES - 1,
.com_pin_alt = false
};
panel_config.vendor_config = &ssd1306_config;
#endif
ESP_ERROR_CHECK(esp_lcd_new_panel_ssd1306(io_handle, &panel_config, &panel_handle));
#elif CONFIG_EXAMPLE_LCD_CONTROLLER_SH1107
ESP_ERROR_CHECK(esp_lcd_new_panel_sh1107(io_handle, &panel_config, &panel_handle));