SH1106 Supported (#416)

* SH1106 Supported

* OLED_SSD1306_128X64_SH1106 -> OLED_SH1106_128X64
This commit is contained in:
Eason
2025-03-26 23:11:08 +08:00
committed by GitHub
parent 4c7e00630b
commit 7ac252637d
4 changed files with 14 additions and 0 deletions

View File

@@ -15,6 +15,10 @@
#include <esp_lcd_panel_ops.h>
#include <esp_lcd_panel_vendor.h>
#ifdef SH1106
#include <esp_lcd_panel_sh1106.h>
#endif
#define TAG "CompactWifiBoard"
LV_FONT_DECLARE(font_puhui_14_1);
@@ -76,7 +80,11 @@ private:
};
panel_config.vendor_config = &ssd1306_config;
#ifdef SH1106
ESP_ERROR_CHECK(esp_lcd_new_panel_sh1106(panel_io_, &panel_config, &panel_));
#else
ESP_ERROR_CHECK(esp_lcd_new_panel_ssd1306(panel_io_, &panel_config, &panel_));
#endif
ESP_LOGI(TAG, "SSD1306 driver installed");
// Reset the display

View File

@@ -42,6 +42,9 @@
#define DISPLAY_HEIGHT 32
#elif CONFIG_OLED_SSD1306_128X64
#define DISPLAY_HEIGHT 64
#elif CONFIG_OLED_SH1106_128X64
#define DISPLAY_HEIGHT 64
#define SH1106
#else
#error "未选择 OLED 屏幕类型"
#endif