Added Lilygo T-Deck support & more (#4)

* added lilygo t-deck

restructured boards
implemented HardwareConfig
implemented lilygo t-deck lcd and touch drivers
added sdkconfig defaults for supported boards

* cleanup

* added esp32s3 job

* build job names updated

* wip

* partial revert

* update readme and build.yml

* updated build.yaml with fix for quotes

* use esp-idf 5.1.2

* improvements and fixes

* fixes for display code

* made config const

* various improvements
This commit is contained in:
Ken Van Hoeylandt
2024-01-05 17:01:39 +01:00
committed by GitHub
parent eed990217f
commit 8336316133
53 changed files with 747 additions and 551 deletions
+13 -1
View File
@@ -1,5 +1,17 @@
# Yellow Board only runs on ESP32
set(project_components nanobake)
if("${IDF_TARGET}" STREQUAL "esp32")
list(APPEND project_components yellow_board)
endif()
# T-Deck is an S3 platform
if("${IDF_TARGET}" STREQUAL "esp32s3")
list(APPEND project_components lilygo_tdeck)
endif()
idf_component_register(
SRC_DIRS "src"
"src/hello_world"
REQUIRES nanobake board_2432s024
REQUIRES ${project_components}
)
+14
View File
@@ -0,0 +1,14 @@
# Kconfig file for NanoBake example app
menu "NanoBake App"
choice
prompt "Board"
default NB_BOARD_CUSTOM
config NB_BOARD_CUSTOM
bool "Custom"
config NB_BOARD_YELLOW_BOARD_24_CAP
bool "Yellow Board (2.4\" capacitive)"
config NB_BOARD_LILYGO_TDECK
bool "LilyGo T-Deck"
endchoice
endmenu
+1
View File
@@ -1,6 +1,7 @@
dependencies:
espressif/esp_lcd_ili9341: "^2.0.0"
espressif/esp_lcd_touch_cst816s: "^1.0.3"
espressif/esp_lcd_touch_gt911: "^1.0.0"
espressif/esp_lcd_touch: "1.1.1"
esp_lvgl_port: '1.4.0'
idf: '>=5.1'
+14
View File
@@ -0,0 +1,14 @@
#pragma once
// Supported hardware:
#if defined(CONFIG_NB_BOARD_LILYGO_TDECK)
#include "lilygo_tdeck.h"
#define NB_BOARD_HARDWARE &lilygo_tdeck
#elif defined(CONFIG_NB_BOARD_YELLOW_BOARD_24_CAP)
#include "yellow_board.h"
#define NB_BOARD_HARDWARE &yellow_board_24inch_cap
#elif defined(CONFIG_NB_BOARD_CUSTOM)
#define NB_BOARD_HARDWARE furi_crash( \
"Replace NB_BOARD_HARDWARE in main.c with your own, or use \"idf.py menuconfig\" to select a supported board." \
)
#endif
+1 -3
View File
@@ -1,5 +1,4 @@
#include "hello_world.h"
#include "furi.h"
#include "apps/services/gui/gui.h"
#include "apps/services/loader/loader.h"
@@ -21,6 +20,5 @@ const AppManifest hello_world_app = {
.type = AppTypeUser,
.on_start = NULL,
.on_stop = NULL,
.on_show = &app_show,
.stack_size = AppStackSizeNormal,
.on_show = &app_show
};
+3 -16
View File
@@ -1,17 +1,12 @@
#include "nanobake.h"
#include "record.h"
#include "apps/services/loader/loader.h"
// Hardware
#include "board_2432s024.h"
#include "board_config.h"
// Apps
#include "hello_world/hello_world.h"
__attribute__((unused)) void app_main(void) {
static Config config = {
.display_driver = &board_2432s024_create_display_driver,
.touch_driver = &board_2432s024_create_touch_driver,
static const Config config = {
.hardware = NB_BOARD_HARDWARE,
.apps = {
&hello_world_app
},
@@ -19,12 +14,4 @@ __attribute__((unused)) void app_main(void) {
};
nanobake_start(&config);
// FURI_RECORD_TRANSACTION(RECORD_LOADER, Loader*, loader, {
// FuriString* error_message = furi_string_alloc();
// if (loader_start_app(loader, hello_world_app.id, NULL, error_message) != LoaderStatusOk) {
// FURI_LOG_E(hello_world_app.id, "%s\r\n", furi_string_get_cstr(error_message));
// }
// furi_string_free(error_message);
// });
}