From 28bd80c1f12ec98921840fc1c802510bbdcf63ef Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sat, 6 Jan 2024 12:24:38 +0100 Subject: [PATCH] Rename project to tactility (#7) * wifi wip * renamed project to Tactility * renamed code files and defines * changed prefixes to tt_ * removed wifi wip code --- CMakeLists.txt | 2 +- README.md | 6 +++--- boards/lilygo_tdeck/CMakeLists.txt | 2 +- boards/lilygo_tdeck/display.c | 8 +++---- boards/lilygo_tdeck/lilygo_tdeck.h | 2 +- boards/lilygo_tdeck/touch.c | 2 +- boards/yellow_board/CMakeLists.txt | 2 +- boards/yellow_board/display.c | 10 ++++----- boards/yellow_board/touch.c | 6 +++--- boards/yellow_board/yellow_board.h | 2 +- components/nanobake/src/devices_i.h | 13 ------------ .../{nanobake => tactility}/CMakeLists.txt | 0 .../assets/ic_small_wifi_off.png | Bin .../assets/ic_small_wifi_on.png | Bin .../config/placeholder.txt | 0 .../src/apps/system/system_info/system_info.c | 0 .../src/apps/system/system_info/system_info.h | 0 .../{nanobake => tactility}/src/devices.c | 6 +++--- .../{nanobake => tactility}/src/devices.h | 0 components/tactility/src/devices_i.h | 13 ++++++++++++ .../{nanobake => tactility}/src/display.c | 2 +- .../{nanobake => tactility}/src/display.h | 2 +- .../{nanobake => tactility}/src/graphics.c | 2 +- .../{nanobake => tactility}/src/graphics.h | 0 .../{nanobake => tactility}/src/graphics_i.h | 2 +- .../{nanobake => tactility}/src/partitions.c | 2 +- .../{nanobake => tactility}/src/partitions.h | 2 +- .../src/services/desktop/desktop.c | 0 .../src/services/gui/gui.c | 0 .../src/services/gui/gui.h | 0 .../src/services/gui/gui_draw.c | 0 .../src/services/gui/gui_i.h | 0 .../src/services/gui/gui_input.c | 0 .../src/services/gui/icon.c | 0 .../src/services/gui/icon.h | 0 .../src/services/gui/icon_i.h | 0 .../src/services/gui/view_port.c | 0 .../src/services/gui/view_port.h | 0 .../src/services/gui/view_port_i.h | 0 .../src/services/gui/view_port_input.c | 0 .../src/services/gui/view_port_input.h | 0 .../src/services/gui/widgets/spacer.c | 0 .../src/services/gui/widgets/spacer.h | 0 .../src/services/gui/widgets/toolbar.c | 0 .../src/services/gui/widgets/toolbar.h | 0 .../src/services/gui/widgets/top_bar.c | 0 .../src/services/gui/widgets/top_bar.h | 0 .../src/services/gui/widgets/widgets.c | 0 .../src/services/gui/widgets/widgets.h | 0 .../src/services/loader/loader.c | 20 ++++++++++++------ .../src/services/loader/loader.h | 0 .../src/services/loader/loader_i.h | 8 +++---- .../nanobake.c => tactility/src/tactility.c} | 12 +++++------ .../nanobake.h => tactility/src/tactility.h} | 5 +---- .../{nanobake => tactility}/src/touch.c | 2 +- .../{nanobake => tactility}/src/touch.h | 2 +- main/CMakeLists.txt | 3 +-- main/Kconfig | 12 +++++------ main/idf_component.yml | 2 +- main/src/board_config.h | 17 ++++++++------- main/src/main.c | 6 +++--- sdkconfig.board.lilygo_tdeck | 2 +- sdkconfig.board.yellow_board | 2 +- sdkconfig.defaults | 2 +- 64 files changed, 92 insertions(+), 89 deletions(-) delete mode 100644 components/nanobake/src/devices_i.h rename components/{nanobake => tactility}/CMakeLists.txt (100%) rename components/{nanobake => tactility}/assets/ic_small_wifi_off.png (100%) rename components/{nanobake => tactility}/assets/ic_small_wifi_on.png (100%) rename components/{nanobake => tactility}/config/placeholder.txt (100%) rename components/{nanobake => tactility}/src/apps/system/system_info/system_info.c (100%) rename components/{nanobake => tactility}/src/apps/system/system_info/system_info.h (100%) rename components/{nanobake => tactility}/src/devices.c (82%) rename components/{nanobake => tactility}/src/devices.h (100%) create mode 100644 components/tactility/src/devices_i.h rename components/{nanobake => tactility}/src/display.c (89%) rename components/{nanobake => tactility}/src/display.h (91%) rename components/{nanobake => tactility}/src/graphics.c (97%) rename components/{nanobake => tactility}/src/graphics.h (100%) rename components/{nanobake => tactility}/src/graphics_i.h (70%) rename components/{nanobake => tactility}/src/partitions.c (98%) rename components/{nanobake => tactility}/src/partitions.h (77%) rename components/{nanobake => tactility}/src/services/desktop/desktop.c (100%) rename components/{nanobake => tactility}/src/services/gui/gui.c (100%) rename components/{nanobake => tactility}/src/services/gui/gui.h (100%) rename components/{nanobake => tactility}/src/services/gui/gui_draw.c (100%) rename components/{nanobake => tactility}/src/services/gui/gui_i.h (100%) rename components/{nanobake => tactility}/src/services/gui/gui_input.c (100%) rename components/{nanobake => tactility}/src/services/gui/icon.c (100%) rename components/{nanobake => tactility}/src/services/gui/icon.h (100%) rename components/{nanobake => tactility}/src/services/gui/icon_i.h (100%) rename components/{nanobake => tactility}/src/services/gui/view_port.c (100%) rename components/{nanobake => tactility}/src/services/gui/view_port.h (100%) rename components/{nanobake => tactility}/src/services/gui/view_port_i.h (100%) rename components/{nanobake => tactility}/src/services/gui/view_port_input.c (100%) rename components/{nanobake => tactility}/src/services/gui/view_port_input.h (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/spacer.c (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/spacer.h (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/toolbar.c (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/toolbar.h (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/top_bar.c (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/top_bar.h (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/widgets.c (100%) rename components/{nanobake => tactility}/src/services/gui/widgets/widgets.h (100%) rename components/{nanobake => tactility}/src/services/loader/loader.c (94%) rename components/{nanobake => tactility}/src/services/loader/loader.h (100%) rename components/{nanobake => tactility}/src/services/loader/loader_i.h (89%) rename components/{nanobake/src/nanobake.c => tactility/src/tactility.c} (88%) rename components/{nanobake/src/nanobake.h => tactility/src/tactility.h} (84%) rename components/{nanobake => tactility}/src/touch.c (81%) rename components/{nanobake => tactility}/src/touch.h (89%) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdc773f7..22de6cfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,4 +16,4 @@ if(NOT "${IDF_TARGET}" STREQUAL "esp32s3") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(NanoBake) +project(Tactility) diff --git a/README.md b/README.md index b64b3aa7..17f72e31 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ ## Overview -NanoBake is a front-end application platform for ESP32. +Tactility is a front-end application platform for ESP32. It is mainly intended for touchscreen devices. It provides an application framework that is based on code from the [Flipper Zero](https://github.com/flipperdevices/flipperzero-firmware/) project. -Nanobake provides: +Tactility provides: - A hardware abstraction layer - UI capabilities (via LVGL) - An application platform that can run apps and services @@ -40,7 +40,7 @@ Other configurations can be supported, but they require you to set up the driver Until there is proper documentation, here are some pointers: - Sample application: [bootstrap](main/src/main.c) and [app](main/src/hello_world/hello_world.c) -- [NanoBake](./components/nanobake/): the main platform with default services and apps +- [Tactility](./components/tactility/): the main platform with default services and apps - [Furi](./components/furi/): the core platform code, based on Flipper Zero firmware ## Building Firmware diff --git a/boards/lilygo_tdeck/CMakeLists.txt b/boards/lilygo_tdeck/CMakeLists.txt index 70ce0831..a83c0643 100644 --- a/boards/lilygo_tdeck/CMakeLists.txt +++ b/boards/lilygo_tdeck/CMakeLists.txt @@ -1,5 +1,5 @@ idf_component_register( SRC_DIRS "." INCLUDE_DIRS "." - REQUIRES nanobake esp_lcd esp_lcd_touch_gt911 + REQUIRES tactility esp_lcd esp_lcd_touch_gt911 ) diff --git a/boards/lilygo_tdeck/display.c b/boards/lilygo_tdeck/display.c index 46db1ea6..4e58ba7e 100644 --- a/boards/lilygo_tdeck/display.c +++ b/boards/lilygo_tdeck/display.c @@ -1,10 +1,10 @@ -#include "nanobake.h" -#include "esp_log.h" +#include "driver/ledc.h" +#include "driver/spi_master.h" #include "esp_err.h" #include "esp_lcd_panel_ops.h" -#include "driver/spi_master.h" #include "esp_lcd_panel_vendor.h" -#include "driver/ledc.h" +#include "esp_log.h" +#include "tactility.h" #define TAG "lilygo_tdeck_display" diff --git a/boards/lilygo_tdeck/lilygo_tdeck.h b/boards/lilygo_tdeck/lilygo_tdeck.h index 778f710c..f26f9001 100644 --- a/boards/lilygo_tdeck/lilygo_tdeck.h +++ b/boards/lilygo_tdeck/lilygo_tdeck.h @@ -1,5 +1,5 @@ #pragma once -#include "nanobake.h" +#include "tactility.h" extern const HardwareConfig lilygo_tdeck; diff --git a/boards/lilygo_tdeck/touch.c b/boards/lilygo_tdeck/touch.c index 4329aa9e..42478ee9 100644 --- a/boards/lilygo_tdeck/touch.c +++ b/boards/lilygo_tdeck/touch.c @@ -1,4 +1,4 @@ -#include "nanobake.h" +#include "tactility.h" #include "esp_lcd_touch_gt911.h" #include "esp_log.h" diff --git a/boards/yellow_board/CMakeLists.txt b/boards/yellow_board/CMakeLists.txt index c09166dd..9ea63b2a 100644 --- a/boards/yellow_board/CMakeLists.txt +++ b/boards/yellow_board/CMakeLists.txt @@ -1,5 +1,5 @@ idf_component_register( SRC_DIRS "." INCLUDE_DIRS "." - REQUIRES nanobake esp_lcd_touch_cst816s esp_lcd_ili9341 + REQUIRES tactility esp_lcd_touch_cst816s esp_lcd_ili9341 ) diff --git a/boards/yellow_board/display.c b/boards/yellow_board/display.c index a25166e2..3ea1ba0e 100644 --- a/boards/yellow_board/display.c +++ b/boards/yellow_board/display.c @@ -1,12 +1,12 @@ -#include "nanobake.h" -#include "esp_lcd_ili9341.h" -#include "esp_log.h" -#include "esp_err.h" -#include "esp_lcd_panel_ops.h" #include "driver/gpio.h" #include "driver/spi_master.h" +#include "esp_err.h" +#include "esp_lcd_ili9341.h" +#include "esp_lcd_panel_ops.h" +#include "esp_log.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" +#include "tactility.h" #define TAG "2432s024_ili9341" diff --git a/boards/yellow_board/touch.c b/boards/yellow_board/touch.c index 0323d8b1..03f72a9a 100644 --- a/boards/yellow_board/touch.c +++ b/boards/yellow_board/touch.c @@ -1,8 +1,8 @@ -#include "nanobake.h" +#include "driver/i2c.h" +#include "esp_err.h" #include "esp_lcd_touch_cst816s.h" #include "esp_log.h" -#include "esp_err.h" -#include "driver/i2c.h" +#include "tactility.h" #define TOUCH_I2C_PORT 0 diff --git a/boards/yellow_board/yellow_board.h b/boards/yellow_board/yellow_board.h index 7ba9a1fc..ca527aee 100644 --- a/boards/yellow_board/yellow_board.h +++ b/boards/yellow_board/yellow_board.h @@ -1,6 +1,6 @@ #pragma once -#include "nanobake.h" +#include "tactility.h" // Capacitive touch version of the 2.4" yellow board extern const HardwareConfig yellow_board_24inch_cap; diff --git a/components/nanobake/src/devices_i.h b/components/nanobake/src/devices_i.h deleted file mode 100644 index f03a20e1..00000000 --- a/components/nanobake/src/devices_i.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "nanobake.h" - -#ifdef __cplusplus -extern "C" { -#endif - -Hardware nb_hardware_init(const HardwareConfig _Nonnull* config); - -#ifdef __cplusplus -} -#endif diff --git a/components/nanobake/CMakeLists.txt b/components/tactility/CMakeLists.txt similarity index 100% rename from components/nanobake/CMakeLists.txt rename to components/tactility/CMakeLists.txt diff --git a/components/nanobake/assets/ic_small_wifi_off.png b/components/tactility/assets/ic_small_wifi_off.png similarity index 100% rename from components/nanobake/assets/ic_small_wifi_off.png rename to components/tactility/assets/ic_small_wifi_off.png diff --git a/components/nanobake/assets/ic_small_wifi_on.png b/components/tactility/assets/ic_small_wifi_on.png similarity index 100% rename from components/nanobake/assets/ic_small_wifi_on.png rename to components/tactility/assets/ic_small_wifi_on.png diff --git a/components/nanobake/config/placeholder.txt b/components/tactility/config/placeholder.txt similarity index 100% rename from components/nanobake/config/placeholder.txt rename to components/tactility/config/placeholder.txt diff --git a/components/nanobake/src/apps/system/system_info/system_info.c b/components/tactility/src/apps/system/system_info/system_info.c similarity index 100% rename from components/nanobake/src/apps/system/system_info/system_info.c rename to components/tactility/src/apps/system/system_info/system_info.c diff --git a/components/nanobake/src/apps/system/system_info/system_info.h b/components/tactility/src/apps/system/system_info/system_info.h similarity index 100% rename from components/nanobake/src/apps/system/system_info/system_info.h rename to components/tactility/src/apps/system/system_info/system_info.h diff --git a/components/nanobake/src/devices.c b/components/tactility/src/devices.c similarity index 82% rename from components/nanobake/src/devices.c rename to components/tactility/src/devices.c index dff6bd16..151b2cc3 100644 --- a/components/nanobake/src/devices.c +++ b/components/tactility/src/devices.c @@ -5,7 +5,7 @@ #define TAG "hardware" -Hardware nb_hardware_init(const HardwareConfig _Nonnull* config) { +Hardware tt_hardware_init(const HardwareConfig _Nonnull* config) { if (config->bootstrap != NULL) { ESP_LOGI(TAG, "Bootstrapping"); config->bootstrap(); @@ -14,13 +14,13 @@ Hardware nb_hardware_init(const HardwareConfig _Nonnull* config) { furi_check(config->display_driver != NULL, "no display driver configured"); DisplayDriver display_driver = config->display_driver(); ESP_LOGI(TAG, "display with driver %s", display_driver.name); - DisplayDevice* display = nb_display_device_alloc(&display_driver); + DisplayDevice* display = tt_display_device_alloc(&display_driver); TouchDevice* touch = NULL; if (config->touch_driver != NULL) { TouchDriver touch_driver = config->touch_driver(); ESP_LOGI(TAG, "touch with driver %s", touch_driver.name); - touch = nb_touch_alloc(&touch_driver); + touch = tt_touch_alloc(&touch_driver); } else { ESP_LOGI(TAG, "no touch configured"); touch = NULL; diff --git a/components/nanobake/src/devices.h b/components/tactility/src/devices.h similarity index 100% rename from components/nanobake/src/devices.h rename to components/tactility/src/devices.h diff --git a/components/tactility/src/devices_i.h b/components/tactility/src/devices_i.h new file mode 100644 index 00000000..84cd45d4 --- /dev/null +++ b/components/tactility/src/devices_i.h @@ -0,0 +1,13 @@ +#pragma once + +#include "tactility.h" + +#ifdef __cplusplus +extern "C" { +#endif + +Hardware tt_hardware_init(const HardwareConfig _Nonnull* config); + +#ifdef __cplusplus +} +#endif diff --git a/components/nanobake/src/display.c b/components/tactility/src/display.c similarity index 89% rename from components/nanobake/src/display.c rename to components/tactility/src/display.c index 5c20404f..9aa647a3 100644 --- a/components/nanobake/src/display.c +++ b/components/tactility/src/display.c @@ -1,7 +1,7 @@ #include "check.h" #include "display.h" -DisplayDevice _Nonnull* nb_display_device_alloc(DisplayDriver _Nonnull* driver) { +DisplayDevice _Nonnull* tt_display_device_alloc(DisplayDriver _Nonnull* driver) { DisplayDevice _Nonnull* display = malloc(sizeof(DisplayDevice)); memset(display, 0, sizeof(DisplayDevice)); furi_check(driver->create_display_device(display), "failed to create display"); diff --git a/components/nanobake/src/display.h b/components/tactility/src/display.h similarity index 91% rename from components/nanobake/src/display.h rename to components/tactility/src/display.h index ca8be2e7..c9ca7233 100644 --- a/components/nanobake/src/display.h +++ b/components/tactility/src/display.h @@ -31,7 +31,7 @@ typedef struct { * @param[in] driver * @return allocated display object */ -DisplayDevice _Nonnull* nb_display_device_alloc(DisplayDriver _Nonnull* driver); +DisplayDevice _Nonnull* tt_display_device_alloc(DisplayDriver _Nonnull* driver); #ifdef __cplusplus } diff --git a/components/nanobake/src/graphics.c b/components/tactility/src/graphics.c similarity index 97% rename from components/nanobake/src/graphics.c rename to components/tactility/src/graphics.c index 59cbfcd4..3627ce8e 100644 --- a/components/nanobake/src/graphics.c +++ b/components/tactility/src/graphics.c @@ -5,7 +5,7 @@ #define TAG "lvgl" -Lvgl nb_graphics_init(Hardware _Nonnull* hardware) { +Lvgl tt_graphics_init(Hardware _Nonnull* hardware) { const lvgl_port_cfg_t lvgl_cfg = { .task_priority = 4, .task_stack = 4096, diff --git a/components/nanobake/src/graphics.h b/components/tactility/src/graphics.h similarity index 100% rename from components/nanobake/src/graphics.h rename to components/tactility/src/graphics.h diff --git a/components/nanobake/src/graphics_i.h b/components/tactility/src/graphics_i.h similarity index 70% rename from components/nanobake/src/graphics_i.h rename to components/tactility/src/graphics_i.h index 0156faa2..70a31387 100644 --- a/components/nanobake/src/graphics_i.h +++ b/components/tactility/src/graphics_i.h @@ -7,7 +7,7 @@ extern "C" { #endif -Lvgl nb_graphics_init(Hardware _Nonnull* hardware); +Lvgl tt_graphics_init(Hardware _Nonnull* hardware); #ifdef __cplusplus } diff --git a/components/nanobake/src/partitions.c b/components/tactility/src/partitions.c similarity index 98% rename from components/nanobake/src/partitions.c rename to components/tactility/src/partitions.c index c11034ba..2a44f057 100644 --- a/components/nanobake/src/partitions.c +++ b/components/tactility/src/partitions.c @@ -37,7 +37,7 @@ static esp_err_t spiffs_init(esp_vfs_spiffs_conf_t* conf) { return ESP_OK; } -esp_err_t nb_partitions_init() { +esp_err_t tt_partitions_init() { ESP_ERROR_CHECK(nvs_flash_init_safely()); esp_vfs_spiffs_conf_t assets_spiffs = { diff --git a/components/nanobake/src/partitions.h b/components/tactility/src/partitions.h similarity index 77% rename from components/nanobake/src/partitions.h rename to components/tactility/src/partitions.h index cf9c6fd9..faeac64a 100644 --- a/components/nanobake/src/partitions.h +++ b/components/tactility/src/partitions.h @@ -5,4 +5,4 @@ #define MOUNT_POINT_ASSETS "/assets" #define MOUNT_POINT_CONFIG "/config" -esp_err_t nb_partitions_init(); +esp_err_t tt_partitions_init(); diff --git a/components/nanobake/src/services/desktop/desktop.c b/components/tactility/src/services/desktop/desktop.c similarity index 100% rename from components/nanobake/src/services/desktop/desktop.c rename to components/tactility/src/services/desktop/desktop.c diff --git a/components/nanobake/src/services/gui/gui.c b/components/tactility/src/services/gui/gui.c similarity index 100% rename from components/nanobake/src/services/gui/gui.c rename to components/tactility/src/services/gui/gui.c diff --git a/components/nanobake/src/services/gui/gui.h b/components/tactility/src/services/gui/gui.h similarity index 100% rename from components/nanobake/src/services/gui/gui.h rename to components/tactility/src/services/gui/gui.h diff --git a/components/nanobake/src/services/gui/gui_draw.c b/components/tactility/src/services/gui/gui_draw.c similarity index 100% rename from components/nanobake/src/services/gui/gui_draw.c rename to components/tactility/src/services/gui/gui_draw.c diff --git a/components/nanobake/src/services/gui/gui_i.h b/components/tactility/src/services/gui/gui_i.h similarity index 100% rename from components/nanobake/src/services/gui/gui_i.h rename to components/tactility/src/services/gui/gui_i.h diff --git a/components/nanobake/src/services/gui/gui_input.c b/components/tactility/src/services/gui/gui_input.c similarity index 100% rename from components/nanobake/src/services/gui/gui_input.c rename to components/tactility/src/services/gui/gui_input.c diff --git a/components/nanobake/src/services/gui/icon.c b/components/tactility/src/services/gui/icon.c similarity index 100% rename from components/nanobake/src/services/gui/icon.c rename to components/tactility/src/services/gui/icon.c diff --git a/components/nanobake/src/services/gui/icon.h b/components/tactility/src/services/gui/icon.h similarity index 100% rename from components/nanobake/src/services/gui/icon.h rename to components/tactility/src/services/gui/icon.h diff --git a/components/nanobake/src/services/gui/icon_i.h b/components/tactility/src/services/gui/icon_i.h similarity index 100% rename from components/nanobake/src/services/gui/icon_i.h rename to components/tactility/src/services/gui/icon_i.h diff --git a/components/nanobake/src/services/gui/view_port.c b/components/tactility/src/services/gui/view_port.c similarity index 100% rename from components/nanobake/src/services/gui/view_port.c rename to components/tactility/src/services/gui/view_port.c diff --git a/components/nanobake/src/services/gui/view_port.h b/components/tactility/src/services/gui/view_port.h similarity index 100% rename from components/nanobake/src/services/gui/view_port.h rename to components/tactility/src/services/gui/view_port.h diff --git a/components/nanobake/src/services/gui/view_port_i.h b/components/tactility/src/services/gui/view_port_i.h similarity index 100% rename from components/nanobake/src/services/gui/view_port_i.h rename to components/tactility/src/services/gui/view_port_i.h diff --git a/components/nanobake/src/services/gui/view_port_input.c b/components/tactility/src/services/gui/view_port_input.c similarity index 100% rename from components/nanobake/src/services/gui/view_port_input.c rename to components/tactility/src/services/gui/view_port_input.c diff --git a/components/nanobake/src/services/gui/view_port_input.h b/components/tactility/src/services/gui/view_port_input.h similarity index 100% rename from components/nanobake/src/services/gui/view_port_input.h rename to components/tactility/src/services/gui/view_port_input.h diff --git a/components/nanobake/src/services/gui/widgets/spacer.c b/components/tactility/src/services/gui/widgets/spacer.c similarity index 100% rename from components/nanobake/src/services/gui/widgets/spacer.c rename to components/tactility/src/services/gui/widgets/spacer.c diff --git a/components/nanobake/src/services/gui/widgets/spacer.h b/components/tactility/src/services/gui/widgets/spacer.h similarity index 100% rename from components/nanobake/src/services/gui/widgets/spacer.h rename to components/tactility/src/services/gui/widgets/spacer.h diff --git a/components/nanobake/src/services/gui/widgets/toolbar.c b/components/tactility/src/services/gui/widgets/toolbar.c similarity index 100% rename from components/nanobake/src/services/gui/widgets/toolbar.c rename to components/tactility/src/services/gui/widgets/toolbar.c diff --git a/components/nanobake/src/services/gui/widgets/toolbar.h b/components/tactility/src/services/gui/widgets/toolbar.h similarity index 100% rename from components/nanobake/src/services/gui/widgets/toolbar.h rename to components/tactility/src/services/gui/widgets/toolbar.h diff --git a/components/nanobake/src/services/gui/widgets/top_bar.c b/components/tactility/src/services/gui/widgets/top_bar.c similarity index 100% rename from components/nanobake/src/services/gui/widgets/top_bar.c rename to components/tactility/src/services/gui/widgets/top_bar.c diff --git a/components/nanobake/src/services/gui/widgets/top_bar.h b/components/tactility/src/services/gui/widgets/top_bar.h similarity index 100% rename from components/nanobake/src/services/gui/widgets/top_bar.h rename to components/tactility/src/services/gui/widgets/top_bar.h diff --git a/components/nanobake/src/services/gui/widgets/widgets.c b/components/tactility/src/services/gui/widgets/widgets.c similarity index 100% rename from components/nanobake/src/services/gui/widgets/widgets.c rename to components/tactility/src/services/gui/widgets/widgets.c diff --git a/components/nanobake/src/services/gui/widgets/widgets.h b/components/tactility/src/services/gui/widgets/widgets.h similarity index 100% rename from components/nanobake/src/services/gui/widgets/widgets.h rename to components/tactility/src/services/gui/widgets/widgets.h diff --git a/components/nanobake/src/services/loader/loader.c b/components/tactility/src/services/loader/loader.c similarity index 94% rename from components/nanobake/src/services/loader/loader.c rename to components/tactility/src/services/loader/loader.c index 012f8c56..859ac6ef 100644 --- a/components/nanobake/src/services/loader/loader.c +++ b/components/tactility/src/services/loader/loader.c @@ -59,7 +59,7 @@ LoaderStatus loader_start_app(const char* id, const char* args, FuriString* erro LoaderMessage message; LoaderMessageLoaderStatusResult result; - message.type = LoaderMessageTypeStartByName; + message.type = LoaderMessageTypeAppStart; message.start.id = id; message.start.args = args; message.start.error_message = error_message; @@ -74,7 +74,7 @@ void loader_start_app_nonblocking(const char* id, const char* args) { LoaderMessage message; LoaderMessageLoaderStatusResult result; - message.type = LoaderMessageTypeStartByName; + message.type = LoaderMessageTypeAppStart; message.start.id = id; message.start.args = args; message.start.error_message = NULL; @@ -173,6 +173,11 @@ static void loader_start_app_with_manifest( } loader_unlock(); + + LoaderEvent event = { + .type = LoaderEventTypeApplicationStarted + }; + furi_pubsub_publish(loader->pubsub, &event); } static LoaderStatus loader_do_start_by_id( @@ -234,8 +239,9 @@ static void loader_do_stop_app() { heap_caps_get_free_size(MALLOC_CAP_INTERNAL) ); - LoaderEvent event; - event.type = LoaderEventTypeApplicationStopped; + LoaderEvent event = { + .type = LoaderEventTypeApplicationStopped + }; furi_pubsub_publish(loader->pubsub, &event); } @@ -256,7 +262,7 @@ static int32_t loader_main(void* p) { if (furi_message_queue_get(loader->queue, &message, FuriWaitForever) == FuriStatusOk) { FURI_LOG_I(TAG, "Processing message of type %d", message.type); switch (message.type) { - case LoaderMessageTypeStartByName: + case LoaderMessageTypeAppStart: if (loader_is_app_running()) { loader_do_stop_app(); } @@ -272,7 +278,7 @@ static int32_t loader_main(void* p) { case LoaderMessageTypeAppStop: loader_do_stop_app(); break; - case LoaderMessageTypeExit: + case LoaderMessageTypeServiceStop: exit_requested = true; break; } @@ -297,7 +303,7 @@ static void loader_stop() { furi_check(loader != NULL); LoaderMessage message = { .api_lock = NULL, - .type = LoaderMessageTypeExit + .type = LoaderMessageTypeServiceStop }; // Send stop signal to thread and wait for thread to finish diff --git a/components/nanobake/src/services/loader/loader.h b/components/tactility/src/services/loader/loader.h similarity index 100% rename from components/nanobake/src/services/loader/loader.h rename to components/tactility/src/services/loader/loader.h diff --git a/components/nanobake/src/services/loader/loader_i.h b/components/tactility/src/services/loader/loader_i.h similarity index 89% rename from components/nanobake/src/services/loader/loader_i.h rename to components/tactility/src/services/loader/loader_i.h index 028274bc..64b079f7 100644 --- a/components/nanobake/src/services/loader/loader_i.h +++ b/components/tactility/src/services/loader/loader_i.h @@ -25,16 +25,16 @@ struct Loader { }; typedef enum { - LoaderMessageTypeStartByName, + LoaderMessageTypeAppStart, LoaderMessageTypeAppStop, - LoaderMessageTypeExit, + LoaderMessageTypeServiceStop, } LoaderMessageType; typedef struct { const char* id; const char* args; FuriString* error_message; -} LoaderMessageStartById; +} LoaderMessageAppStart; typedef struct { LoaderStatus value; @@ -51,7 +51,7 @@ typedef struct { LoaderMessageType type; union { - LoaderMessageStartById start; + LoaderMessageAppStart start; }; union { diff --git a/components/nanobake/src/nanobake.c b/components/tactility/src/tactility.c similarity index 88% rename from components/nanobake/src/nanobake.c rename to components/tactility/src/tactility.c index f737eb1d..532fa1de 100644 --- a/components/nanobake/src/nanobake.c +++ b/components/tactility/src/tactility.c @@ -1,12 +1,12 @@ -#include "nanobake.h" #include "app_manifest_registry.h" #include "devices_i.h" #include "furi.h" #include "graphics_i.h" #include "partitions.h" #include "services/gui/gui.h" +#include "tactility.h" -#define TAG "nanobake" +#define TAG "tactility" Gui* gui_alloc(); @@ -66,13 +66,13 @@ static void start_user_services(const Config* _Nonnull config) { FURI_LOG_I(TAG, "User services started"); } -__attribute__((unused)) extern void nanobake_start(const Config* _Nonnull config) { +__attribute__((unused)) extern void tactility_start(const Config* _Nonnull config) { furi_init(); - nb_partitions_init(); + tt_partitions_init(); - Hardware hardware = nb_hardware_init(config->hardware); - /*NbLvgl lvgl =*/nb_graphics_init(&hardware); + Hardware hardware = tt_hardware_init(config->hardware); + /*NbLvgl lvgl =*/tt_graphics_init(&hardware); // Register all apps register_system_apps(); diff --git a/components/nanobake/src/nanobake.h b/components/tactility/src/tactility.h similarity index 84% rename from components/nanobake/src/nanobake.h rename to components/tactility/src/tactility.h index 3d38f410..1086ca90 100644 --- a/components/nanobake/src/nanobake.h +++ b/components/tactility/src/tactility.h @@ -34,10 +34,7 @@ typedef struct { const ServiceManifest* const services[CONFIG_SERVICES_LIMIT]; } Config; -__attribute__((unused)) extern void nanobake_start(const Config _Nonnull* config); - -FuriThreadId nanobake_get_app_thread_id(size_t index); -size_t nanobake_get_app_thread_count(); +__attribute__((unused)) extern void tactility_start(const Config _Nonnull* config); #ifdef __cplusplus } diff --git a/components/nanobake/src/touch.c b/components/tactility/src/touch.c similarity index 81% rename from components/nanobake/src/touch.c rename to components/tactility/src/touch.c index b365c801..4d7de8c3 100644 --- a/components/nanobake/src/touch.c +++ b/components/tactility/src/touch.c @@ -1,7 +1,7 @@ #include "check.h" #include "touch.h" -TouchDevice _Nonnull* nb_touch_alloc(TouchDriver _Nonnull* driver) { +TouchDevice _Nonnull* tt_touch_alloc(TouchDriver _Nonnull* driver) { TouchDevice _Nonnull* touch = malloc(sizeof(TouchDevice)); bool success = driver->create_touch_device( &(touch->io_handle), diff --git a/components/nanobake/src/touch.h b/components/tactility/src/touch.h similarity index 89% rename from components/nanobake/src/touch.h rename to components/tactility/src/touch.h index bb927c0c..638cb3ba 100644 --- a/components/nanobake/src/touch.h +++ b/components/tactility/src/touch.h @@ -23,7 +23,7 @@ typedef struct { * @param[in] driver * @return a newly allocated instance */ -TouchDevice _Nonnull* nb_touch_alloc(TouchDriver _Nonnull* driver); +TouchDevice _Nonnull* tt_touch_alloc(TouchDriver _Nonnull* driver); #ifdef __cplusplus } diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 36f50510..9f67f2a1 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,5 +1,4 @@ -# Yellow Board only runs on ESP32 -set(project_components nanobake) +set(project_components tactility) if("${IDF_TARGET}" STREQUAL "esp32") list(APPEND project_components yellow_board) diff --git a/main/Kconfig b/main/Kconfig index 2f0f7237..8000198b 100644 --- a/main/Kconfig +++ b/main/Kconfig @@ -1,14 +1,14 @@ -# Kconfig file for NanoBake example app -menu "NanoBake App" +# Kconfig file for Tactility example app +menu "Tactility App" choice prompt "Board" - default NB_BOARD_CUSTOM + default TT_BOARD_CUSTOM - config NB_BOARD_CUSTOM + config TT_BOARD_CUSTOM bool "Custom" - config NB_BOARD_YELLOW_BOARD_24_CAP + config TT_BOARD_YELLOW_BOARD_24_CAP bool "Yellow Board (2.4\" capacitive)" - config NB_BOARD_LILYGO_TDECK + config TT_BOARD_LILYGO_TDECK bool "LilyGo T-Deck" endchoice endmenu diff --git a/main/idf_component.yml b/main/idf_component.yml index b02f5a80..348167e2 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -4,4 +4,4 @@ dependencies: espressif/esp_lcd_touch_gt911: "^1.0.0" espressif/esp_lcd_touch: "1.1.1" esp_lvgl_port: '1.4.0' - idf: '>=5.1' + idf: '>=5.1.2' diff --git a/main/src/board_config.h b/main/src/board_config.h index dffdada9..f6d18f84 100644 --- a/main/src/board_config.h +++ b/main/src/board_config.h @@ -1,14 +1,15 @@ #pragma once +#include "sdkconfig.h" + // Supported hardware: -#if defined(CONFIG_NB_BOARD_LILYGO_TDECK) +#if defined(CONFIG_TT_BOARD_LILYGO_TDECK) #include "lilygo_tdeck.h" -#define NB_BOARD_HARDWARE &lilygo_tdeck -#elif defined(CONFIG_NB_BOARD_YELLOW_BOARD_24_CAP) +#define TT_BOARD_HARDWARE &lilygo_tdeck +#elif defined(CONFIG_TT_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." \ -) +#define TT_BOARD_HARDWARE &yellow_board_24inch_cap +#else +#define TT_BOARD_HARDWARE NULL +#error Replace TT_BOARD_HARDWARE in main.c with your own. Or copy one of the ./sdkconfig.board.* files into ./sdkconfig. #endif diff --git a/main/src/main.c b/main/src/main.c index 5d179c80..62ab3bd3 100644 --- a/main/src/main.c +++ b/main/src/main.c @@ -1,4 +1,4 @@ -#include "nanobake.h" +#include "tactility.h" #include "board_config.h" // Apps @@ -10,12 +10,12 @@ __attribute__((unused)) void app_main(void) { * Auto-select a board based on the ./sdkconfig.board.* file * that you copied to ./sdkconfig before you opened this project. */ - .hardware = NB_BOARD_HARDWARE, + .hardware = TT_BOARD_HARDWARE, .apps = { &hello_world_app }, .services = { }, }; - nanobake_start(&config); + tactility_start(&config); } diff --git a/sdkconfig.board.lilygo_tdeck b/sdkconfig.board.lilygo_tdeck index ac104ab0..27d1a2f9 100644 --- a/sdkconfig.board.lilygo_tdeck +++ b/sdkconfig.board.lilygo_tdeck @@ -14,7 +14,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" # Hardware defaults -CONFIG_NB_BOARD_LILYGO_TDECK=y +CONFIG_TT_BOARD_LILYGO_TDECK=y CONFIG_IDF_TARGET="esp32s3" CONFIG_LV_COLOR_16_SWAP=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y diff --git a/sdkconfig.board.yellow_board b/sdkconfig.board.yellow_board index b3a30fba..6a48f618 100644 --- a/sdkconfig.board.yellow_board +++ b/sdkconfig.board.yellow_board @@ -14,7 +14,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" # Hardware defaults -CONFIG_NB_BOARD_YELLOW_BOARD_24_CAP=y +CONFIG_TT_BOARD_YELLOW_BOARD_24_CAP=y CONFIG_IDF_TARGET="esp32" CONFIG_LV_COLOR_16_SWAP=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 31cb3d6b..e35b6c0b 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -16,4 +16,4 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" CONFIG_FREERTOS_UNICORE=y # Hardware defaults -CONFIG_NB_BOARD_CUSTOM=y +CONFIG_TT_BOARD_CUSTOM=y