Refactoring

- Add SPI display
- Add SSD1326 (not fully tested)
- Remove all but one dependecies to HW (#define)
- Cleanup KProjectBuild
- Update .defaults
This commit is contained in:
philippe44
2020-02-09 00:25:50 -08:00
parent f2920675f8
commit cfae996fd3
60 changed files with 1257 additions and 1017 deletions

View File

@@ -27,7 +27,7 @@
#include "display.h"
// here we should include all possible drivers
extern struct display_s SSD1306_display;
extern struct display_s SSD13x6_display;
struct display_s *display = NULL;
@@ -66,8 +66,8 @@ void display_init(char *welcome) {
if (item && *item) {
char * drivername=strstr(item,"driver");
if (!drivername || (drivername && strcasestr(drivername,"SSD1306"))) {
display = &SSD1306_display;
if (!drivername || (drivername && (strcasestr(drivername,"SSD1306") || strcasestr(drivername,"SSD1326")))) {
display = &SSD13x6_display;
if (display->init(item, welcome)) {
init = true;
ESP_LOGI(TAG, "Display initialization successful");
@@ -79,7 +79,7 @@ void display_init(char *welcome) {
ESP_LOGE(TAG,"Unknown display driver name in display config: %s",item);
}
} else {
ESP_LOGW(TAG, "no display");
ESP_LOGI(TAG, "no display");
}
if (init) {