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

@@ -166,6 +166,8 @@ choice DISPLAY_OLED_TYPE
bool "SSD1306, 分辨率128*32"
config OLED_SSD1306_128X64
bool "SSD1306, 分辨率128*64"
config OLED_SH1106_128X64
bool "SH1106, 分辨率128*64"
endchoice
choice DISPLAY_LCD_TYPE

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

View File

@@ -20,6 +20,7 @@ dependencies:
lvgl/lvgl: "~9.2.2"
esp_lvgl_port: "~2.4.4"
espressif/esp_io_expander_tca95xx_16bit: "^2.0.0"
tny-robotics/sh1106-esp-idf: ^1.0.0
## Required IDF version
idf:
version: ">=5.3"