Verify that SPI works with SH1106

This commit is contained in:
philippe44
2020-02-10 20:44:44 -08:00
parent 55e0efdb4a
commit 26c9a9e897
9 changed files with 151 additions and 102 deletions

View File

@@ -36,7 +36,7 @@ static const char *TAG = "display";
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define DISPLAYER_STACK_SIZE 2048
#define DISPLAYER_STACK_SIZE (3*1024)
#define SCROLLABLE_SIZE 384
#define HEADER_SIZE 64
#define DEFAULT_SLEEP 3600
@@ -66,14 +66,14 @@ void display_init(char *welcome) {
if (item && *item) {
char * drivername=strstr(item,"driver");
if (!drivername || (drivername && (strcasestr(drivername,"SSD1306") || strcasestr(drivername,"SSD1326")))) {
if (!drivername || (drivername && (strcasestr(drivername,"SSD1306") || strcasestr(drivername,"SSD1326") || strcasestr(drivername,"SH1106")))) {
display = &SSD13x6_display;
if (display->init(item, welcome)) {
init = true;
ESP_LOGI(TAG, "Display initialization successful");
} else {
display = NULL;
ESP_LOGE(TAG, "Display initialization failed");
ESP_LOGW(TAG, "Display initialization failed");
}
} else {
ESP_LOGE(TAG,"Unknown display driver name in display config: %s",item);