Move app/service code from tactility-core to tactility (#14)

* Move app/service code from tactility-core to tactility

* fix formatting

* updated dev docs
This commit is contained in:
Ken Van Hoeylandt 2024-01-20 15:41:01 +01:00 committed by GitHub
parent 0c724e2e68
commit e2209ccba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 83 additions and 194 deletions

View File

@ -56,10 +56,17 @@ The build scripts will detect if ESP-IDF is available. They will adapter if you
### Development ### Development
Directories explained:
- `app-esp`: The ESP32 application example
- `app-sim`: The PC/simulator application example
- `boards`: Contains ESP modules with drivers
- `tactility`: The main application platform code ([src/](./tactility/src))
- `tactility-esp`: ESP-specific application code (e.g. wifi app and service)
- `tactility-core`: Core functionality regarding threads, stdlib, etc. ([src/](./tactility-core/src))
- `libs`: Contains a mix of regular libraries and ESP modules
Until there is proper documentation, here are some pointers: Until there is proper documentation, here are some pointers:
- Sample application: [bootstrap](app-esp/src/main.c) and [app](app-esp/src/hello_world/hello_world.c)
- [Tactility](./components/tactility): The main platform with default services and apps.
- [Tactility Core](./tactility-core): The core platform code.
## License ## License

View File

@ -2,9 +2,7 @@
#include "services/gui/gui.h" #include "services/gui/gui.h"
#include "services/loader/loader.h" #include "services/loader/loader.h"
static void app_show(App app, lv_obj_t* parent) { static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
UNUSED(app);
lv_obj_t* label = lv_label_create(parent); lv_obj_t* label = lv_label_create(parent);
lv_label_set_recolor(label, true); lv_label_set_recolor(label, true);
lv_obj_set_width(label, 200); lv_obj_set_width(label, 200);

View File

@ -11,7 +11,7 @@ extern const ServiceManifest wifi_service;
extern const AppManifest wifi_connect_app; extern const AppManifest wifi_connect_app;
extern const AppManifest wifi_manage_app; extern const AppManifest wifi_manage_app;
__attribute__((unused)) void app_main(void) { TT_UNUSED void app_main(void) {
static const Config config = { static const Config config = {
/** /**
* Auto-select a board based on the ./sdkconfig.board.* file * Auto-select a board based on the ./sdkconfig.board.* file
@ -29,7 +29,6 @@ __attribute__((unused)) void app_main(void) {
.auto_start_app_id = NULL .auto_start_app_id = NULL
}; };
tt_core_init();
tt_esp_init(&config); tt_esp_init(&config);
tt_init(&config.apps, CONFIG_APPS_LIMIT, &config.services, CONFIG_SERVICES_LIMIT); tt_init(&config.apps, CONFIG_APPS_LIMIT, &config.services, CONFIG_SERVICES_LIMIT);

View File

@ -5,3 +5,6 @@ add_executable(app-sim ${SOURCES})
target_link_libraries(app-sim PRIVATE tactility) target_link_libraries(app-sim PRIVATE tactility)
target_link_libraries(app-sim PRIVATE tactility-core) target_link_libraries(app-sim PRIVATE tactility-core)
add_definitions(-D_Nullable=)
add_definitions(-D_Nonnull=)

View File

@ -1,26 +1,17 @@
#include "log.h"
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "task.h" #include "log.h"
#include "portmacro.h" #include "portmacro.h"
#include "tactility.h"
#include "task.h"
void vAssertCalled(TT_UNUSED unsigned long line, TT_UNUSED const char* const file) {
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
{
static portBASE_TYPE xPrinted = pdFALSE; static portBASE_TYPE xPrinted = pdFALSE;
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0; volatile uint32_t set_to_nonzero_in_debugger_to_continue = 0;
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
taskENTER_CRITICAL(); taskENTER_CRITICAL();
{ {
/* You can step out of this function to debug the assertion by using // Step out by attaching a debugger and setting set_to_nonzero_in_debugger_to_continue
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero while (set_to_nonzero_in_debugger_to_continue == 0) { /* NO-OP */
value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
} }
} }
taskEXIT_CRITICAL(); taskEXIT_CRITICAL();

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "core.h" #include "event_flag.h"
typedef EventFlag* ApiLock; typedef EventFlag* ApiLock;

View File

@ -1,14 +0,0 @@
#include "core.h"
#include "app_manifest_registry.h"
#include "service_registry.h"
#define TAG "tactility"
void tt_core_init() {
TT_LOG_I(TAG, "core init start");
tt_assert(!tt_kernel_is_irq());
tt_service_registry_init();
tt_app_manifest_registry_init();
TT_LOG_I(TAG, "core init complete");
}

View File

@ -1,26 +0,0 @@
#pragma once
#include <stdlib.h>
#include "tactility_core.h"
#include "event_flag.h"
#include "kernel.h"
#include "message_queue.h"
#include "mutex.h"
#include "pubsub.h"
#include "semaphore.h"
#include "string.h"
#include "thread.h"
#include "timer.h"
#include "tt_stream_buffer.h"
#ifdef __cplusplus
extern "C" {
#endif
void tt_core_init();
#ifdef __cplusplus
}
#endif

View File

@ -8,18 +8,20 @@
#include "portmacro.h" #include "portmacro.h"
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
#define TT_RETURNS_NONNULL __attribute__((returns_nonnull)) #define TT_RETURNS_NONNULL __attribute__((returns_nonnull))
#define TT_WARN_UNUSED __attribute__((warn_unused_result)) #define TT_WARN_UNUSED __attribute__((warn_unused_result))
#define TT_UNUSED __attribute__((unused))
#define TT_WEAK __attribute__((weak)) #define TT_WEAK __attribute__((weak))
#define TT_PACKED __attribute__((packed)) #define TT_PACKED __attribute__((packed))
#define TT_PLACE_IN_SECTION(x) __attribute__((section(x)))
#define TT_ALIGN(n) __attribute__((aligned(n)))
// Used by portENABLE_INTERRUPTS and portDISABLE_INTERRUPTS? // Used by portENABLE_INTERRUPTS and portDISABLE_INTERRUPTS?
#ifdef ESP_TARGET #ifdef ESP_TARGET
#define TT_IS_IRQ_MODE() (xPortInIsrContext() == pdTRUE) #define TT_IS_IRQ_MODE() (xPortInIsrContext() == pdTRUE)
@ -30,7 +32,3 @@ extern "C" {
#define TT_IS_ISR() (TT_IS_IRQ_MODE()) #define TT_IS_ISR() (TT_IS_IRQ_MODE())
#define TT_CHECK_RETURN __attribute__((__warn_unused_result__)) #define TT_CHECK_RETURN __attribute__((__warn_unused_result__))
#ifdef __cplusplus
}
#endif

View File

@ -1,114 +1,62 @@
#pragma once #pragma once
#ifdef __cplusplus #define TT_MAX(a, b) \
extern "C" {
#endif
#ifndef MAX
#define MAX(a, b) \
({ \ ({ \
__typeof__(a) _a = (a); \ __typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \ __typeof__(b) _b = (b); \
_a > _b ? _a : _b; \ _a > _b ? _a : _b; \
}) })
#endif
#ifndef MIN #define TT_MIN(a, b) \
#define MIN(a, b) \
({ \ ({ \
__typeof__(a) _a = (a); \ __typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \ __typeof__(b) _b = (b); \
_a < _b ? _a : _b; \ _a < _b ? _a : _b; \
}) })
#endif
#ifndef ABS #define TT_ABS(a) ({ (a) < 0 ? -(a) : (a); })
#define ABS(a) ({ (a) < 0 ? -(a) : (a); })
#endif
#ifndef ROUND_UP_TO #define TT_ROUND_UP_TO(a, b) \
#define ROUND_UP_TO(a, b) \
({ \ ({ \
__typeof__(a) _a = (a); \ __typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \ __typeof__(b) _b = (b); \
_a / _b + !!(_a % _b); \ _a / _b + !!(_a % _b); \
}) })
#endif
#ifndef CLAMP #define TT_CLAMP(x, upper, lower) (TT_MIN(upper, TT_MAX(x, lower)))
#define CLAMP(x, upper, lower) (MIN(upper, MAX(x, lower)))
#endif
#ifndef COUNT_OF #define TT_COUNT_OF(x) (sizeof(x) / sizeof(x[0]))
#define COUNT_OF(x) (sizeof(x) / sizeof(x[0]))
#endif
#ifndef TT_SWAP
#define TT_SWAP(x, y) \ #define TT_SWAP(x, y) \
do { \ do { \
typeof(x) SWAP = x; \ typeof(x) SWAP = x; \
x = y; \ x = y; \
y = SWAP; \ y = SWAP; \
} while (0) } while (0)
#endif
#ifndef PLACE_IN_SECTION #define TT_STRINGIFY(x) #x
#define PLACE_IN_SECTION(x) __attribute__((section(x)))
#endif
#ifndef ALIGN #define TT_TOSTRING(x) TT_STRINGIFY(x)
#define ALIGN(n) __attribute__((aligned(n)))
#endif
#ifndef __weak #define TT_CONCATENATE(a, b) CONCATENATE_(a, b)
#define __weak __attribute__((weak)) #define TT_CONCATENATE_(a, b) a##b
#endif
#ifndef UNUSED #define TT_REVERSE_BYTES_U32(x) \
#define UNUSED(X) (void)(X)
#endif
#ifndef STRINGIFY
#define STRINGIFY(x) #x
#endif
#ifndef TOSTRING
#define TOSTRING(x) STRINGIFY(x)
#endif
#ifndef CONCATENATE
#define CONCATENATE(a, b) CONCATENATE_(a, b)
#define CONCATENATE_(a, b) a##b
#endif
#ifndef REVERSE_BYTES_U32
#define REVERSE_BYTES_U32(x) \
((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | \ ((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | \
(((x) & 0xFF000000) >> 24)) (((x) & 0xFF000000) >> 24))
#endif
#ifndef TT_BIT
#define TT_BIT(x, n) (((x) >> (n)) & 1) #define TT_BIT(x, n) (((x) >> (n)) & 1)
#endif
#ifndef TT_BIT_SET
#define TT_BIT_SET(x, n) \ #define TT_BIT_SET(x, n) \
({ \ ({ \
__typeof__(x) _x = (1); \ __typeof__(x) _x = (1); \
(x) |= (_x << (n)); \ (x) |= (_x << (n)); \
}) })
#endif
#ifndef TT_BIT_CLEAR
#define TT_BIT_CLEAR(x, n) \ #define TT_BIT_CLEAR(x, n) \
({ \ ({ \
__typeof__(x) _x = (1); \ __typeof__(x) _x = (1); \
(x) &= ~(_x << (n)); \ (x) &= ~(_x << (n)); \
}) })
#endif
#define TT_SW_MEMBARRIER() asm volatile("" : : : "memory") #define TT_SW_MEMBARRIER() asm volatile("" : : : "memory")
#ifdef __cplusplus
}
#endif

View File

@ -1,3 +1,6 @@
/** @file:m_cstr_dup.h
* @brief Helpers for mlib
*/
#pragma once #pragma once
#include <m-core.h> #include <m-core.h>

View File

@ -3,13 +3,10 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include "app.h"
#include "check.h" #include "check.h"
#include "core.h"
#include "core_defines.h" #include "core_defines.h"
#include "core_extra_defines.h" #include "core_extra_defines.h"
#include "core_types.h" #include "core_types.h"
#include "critical.h" #include "critical.h"
#include "event_flag.h" #include "event_flag.h"
#include "log.h" #include "log.h"
#include "service.h"

View File

@ -12,8 +12,7 @@
// Forward declarations // Forward declarations
static void wifi_connect_event_callback(const void* message, void* context); static void wifi_connect_event_callback(const void* message, void* context);
static void on_connect(const char* ssid, const char* password, void* parameter) { static void on_connect(const char* ssid, const char* password, TT_UNUSED void* parameter) {
UNUSED(parameter);
wifi_connect(ssid, password); wifi_connect(ssid, password);
} }

View File

@ -17,8 +17,7 @@ static void show_keyboard(lv_event_t* event) {
lv_obj_scroll_to_view(event->current_target, LV_ANIM_ON); lv_obj_scroll_to_view(event->current_target, LV_ANIM_ON);
} }
static void hide_keyboard(lv_event_t* event) { static void hide_keyboard(TT_UNUSED lv_event_t* event) {
UNUSED(event);
gui_keyboard_hide(); gui_keyboard_hide();
} }
@ -126,11 +125,14 @@ void wifi_connect_view_create(App app, void* wifi, lv_obj_t* parent) {
} }
} }
void wifi_connect_view_destroy(WifiConnectView* view) { void wifi_connect_view_destroy(TT_UNUSED WifiConnectView* view) {
// NO-OP
} }
void wifi_connect_view_update(WifiConnectView* view, WifiConnectBindings* bindings, WifiConnectState* state) { void wifi_connect_view_update(
UNUSED(view); TT_UNUSED WifiConnectView* view,
UNUSED(bindings); TT_UNUSED WifiConnectBindings* bindings,
UNUSED(state); TT_UNUSED WifiConnectState* state
) {
// NO-OP
} }

View File

@ -155,7 +155,7 @@ void wifi_get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* res
} else { } else {
uint16_t i = 0; uint16_t i = 0;
TT_LOG_I(TAG, "processing up to %d APs", wifi_singleton->scan_list_count); TT_LOG_I(TAG, "processing up to %d APs", wifi_singleton->scan_list_count);
uint16_t last_index = MIN(wifi_singleton->scan_list_count, limit); uint16_t last_index = TT_MIN(wifi_singleton->scan_list_count, limit);
for (; i < last_index; ++i) { for (; i < last_index; ++i) {
memcpy(records[i].ssid, wifi_singleton->scan_list[i].ssid, 33); memcpy(records[i].ssid, wifi_singleton->scan_list[i].ssid, 33);
records[i].rssi = wifi_singleton->scan_list[i].rssi; records[i].rssi = wifi_singleton->scan_list[i].rssi;
@ -224,8 +224,7 @@ static void wifi_publish_event_simple(Wifi* wifi, WifiEventType type) {
tt_pubsub_publish(wifi->pubsub, &turning_on_event); tt_pubsub_publish(wifi->pubsub, &turning_on_event);
} }
static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { static void event_handler(TT_UNUSED void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
UNUSED(arg);
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) { if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
TT_LOG_I(TAG, "event_handler: sta start"); TT_LOG_I(TAG, "event_handler: sta start");
if (wifi_singleton->radio_state == WIFI_RADIO_CONNECTION_PENDING) { if (wifi_singleton->radio_state == WIFI_RADIO_CONNECTION_PENDING) {
@ -397,7 +396,7 @@ static void wifi_scan_internal(Wifi* wifi) {
esp_wifi_scan_start(NULL, true); esp_wifi_scan_start(NULL, true);
uint16_t record_count = wifi->scan_list_limit; uint16_t record_count = wifi->scan_list_limit;
ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&record_count, wifi->scan_list)); ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&record_count, wifi->scan_list));
uint16_t safe_record_count = MIN(wifi->scan_list_limit, record_count); uint16_t safe_record_count = TT_MIN(wifi->scan_list_limit, record_count);
wifi->scan_list_count = safe_record_count; wifi->scan_list_count = safe_record_count;
TT_LOG_I(TAG, "Scanned %u APs. Showing %u:", record_count, safe_record_count); TT_LOG_I(TAG, "Scanned %u APs. Showing %u:", record_count, safe_record_count);
for (uint16_t i = 0; i < safe_record_count; i++) { for (uint16_t i = 0; i < safe_record_count; i++) {
@ -529,9 +528,7 @@ static void wifi_disconnect_internal_but_keep_active(Wifi* wifi) {
} }
// ESP wifi APIs need to run from the main task, so we can't just spawn a thread // ESP wifi APIs need to run from the main task, so we can't just spawn a thread
_Noreturn int32_t wifi_main(void* p) { _Noreturn int32_t wifi_main(TT_UNUSED void* parameter) {
UNUSED(p);
TT_LOG_I(TAG, "Started main loop"); TT_LOG_I(TAG, "Started main loop");
tt_check(wifi_singleton != NULL); tt_check(wifi_singleton != NULL);
Wifi* wifi = wifi_singleton; Wifi* wifi = wifi_singleton;
@ -562,14 +559,12 @@ _Noreturn int32_t wifi_main(void* p) {
} }
} }
static void wifi_service_start(Service service) { static void wifi_service_start(TT_UNUSED Service service) {
UNUSED(service);
tt_check(wifi_singleton == NULL); tt_check(wifi_singleton == NULL);
wifi_singleton = wifi_alloc(); wifi_singleton = wifi_alloc();
} }
static void wifi_service_stop(Service service) { static void wifi_service_stop(TT_UNUSED Service service) {
UNUSED(service);
tt_check(wifi_singleton != NULL); tt_check(wifi_singleton != NULL);
WifiRadioState state = wifi_singleton->radio_state; WifiRadioState state = wifi_singleton->radio_state;

View File

@ -1,6 +1,5 @@
#include "tactility.h" #include "tactility.h"
#include "core.h"
#include "graphics_i.h" #include "graphics_i.h"
#include "devices_i.h" // TODO: Rename to hardware*.* #include "devices_i.h" // TODO: Rename to hardware*.*
#include "nvs_flash.h" #include "nvs_flash.h"

View File

@ -1,7 +1,6 @@
#pragma once #pragma once
#include <stdio.h> #include "core_defines.h"
#include <sys/cdefs.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -18,9 +18,7 @@ static void create_app_widget(const AppManifest* manifest, void* _Nullable paren
lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest); lv_obj_add_event_cb(btn, &on_app_pressed, LV_EVENT_CLICKED, (void*)manifest);
} }
static void desktop_show(App app, lv_obj_t* parent) { static void desktop_show(TT_UNUSED App app, TT_UNUSED lv_obj_t* parent) {
UNUSED(app);
lv_obj_t* list = lv_list_create(parent); lv_obj_t* list = lv_list_create(parent);
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100)); lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
lv_obj_center(list); lv_obj_center(list);

View File

@ -3,9 +3,7 @@
#include "lvgl.h" #include "lvgl.h"
#include "thread.h" #include "thread.h"
static void app_show(App app, lv_obj_t* parent) { static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
UNUSED(app);
lv_obj_t* heap_info = lv_label_create(parent); lv_obj_t* heap_info = lv_label_create(parent);
lv_label_set_recolor(heap_info, true); lv_label_set_recolor(heap_info, true);
lv_obj_set_width(heap_info, 200); lv_obj_set_width(heap_info, 200);

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <stdio.h> #include "tactility_core.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -15,7 +15,7 @@ typedef struct {
/** /**
* The identifier by which the app is launched by the system and other apps. * The identifier by which the app is launched by the system and other apps.
*/ */
const char* _Nonnull id; const char* id;
/** /**
* Non-blocking method to call when service is started. * Non-blocking method to call when service is started.

View File

@ -4,6 +4,7 @@
#include "m_cstr_dup.h" #include "m_cstr_dup.h"
#include "mutex.h" #include "mutex.h"
#include "service_i.h" #include "service_i.h"
#include "service_manifest.h"
#include "tactility_core.h" #include "tactility_core.h"
#define TAG "service_registry" #define TAG "service_registry"

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "service_manifest.h" #include "service_manifest.h"
#include "tactility_core.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -118,8 +118,7 @@ void gui_hide_app() {
gui_unlock(); gui_unlock();
} }
static int32_t gui_main(void* p) { static int32_t gui_main(TT_UNUSED void* p) {
UNUSED(p);
tt_check(gui); tt_check(gui);
Gui* local_gui = gui; Gui* local_gui = gui;
@ -146,18 +145,14 @@ static int32_t gui_main(void* p) {
// region AppManifest // region AppManifest
static void gui_start(Service service) { static void gui_start(TT_UNUSED Service service) {
UNUSED(service);
gui = gui_alloc(); gui = gui_alloc();
tt_thread_set_priority(gui->thread, ThreadPriorityNormal); tt_thread_set_priority(gui->thread, ThreadPriorityNormal);
tt_thread_start(gui->thread); tt_thread_start(gui->thread);
} }
static void gui_stop(Service service) { static void gui_stop(TT_UNUSED Service service) {
UNUSED(service);
gui_lock(); gui_lock();
ThreadId thread_id = tt_thread_get_id(gui->thread); ThreadId thread_id = tt_thread_get_id(gui->thread);

View File

@ -263,9 +263,7 @@ static void loader_do_stop_app() {
} }
static int32_t loader_main(void* p) { static int32_t loader_main(TT_UNUSED void* parameter) {
UNUSED(p);
LoaderMessage message; LoaderMessage message;
bool exit_requested = false; bool exit_requested = false;
while (!exit_requested) { while (!exit_requested) {
@ -298,8 +296,7 @@ static int32_t loader_main(void* p) {
// region AppManifest // region AppManifest
static void loader_start(Service service) { static void loader_start(TT_UNUSED Service service) {
UNUSED(service);
tt_check(loader_singleton == NULL); tt_check(loader_singleton == NULL);
loader_singleton = loader_alloc(); loader_singleton = loader_alloc();
@ -307,8 +304,7 @@ static void loader_start(Service service) {
tt_thread_start(loader_singleton->thread); tt_thread_start(loader_singleton->thread);
} }
static void loader_stop(Service service) { static void loader_stop(TT_UNUSED Service service) {
UNUSED(service);
tt_check(loader_singleton != NULL); tt_check(loader_singleton != NULL);
// Send stop signal to thread and wait for thread to finish // Send stop signal to thread and wait for thread to finish

View File

@ -1,7 +1,6 @@
#include "tactility.h" #include "tactility.h"
#include "app_manifest_registry.h" #include "app_manifest_registry.h"
#include "core.h"
#include "service_registry.h" #include "service_registry.h"
#define TAG "tactility" #define TAG "tactility"
@ -65,12 +64,15 @@ static void register_and_start_user_services(
} }
} }
__attribute__((unused)) void tt_init( TT_UNUSED void tt_init(
const AppManifest* const* _Nonnull apps, const AppManifest* const* _Nonnull apps,
size_t apps_count, size_t apps_count,
const ServiceManifest* const* services, const ServiceManifest* const* services,
size_t services_count size_t services_count
) { ) {
tt_service_registry_init();
tt_app_manifest_registry_init();
TT_LOG_I(TAG, "tt_init started"); TT_LOG_I(TAG, "tt_init started");
// Register all apps // Register all apps
register_system_services(); register_system_services();
@ -83,4 +85,3 @@ __attribute__((unused)) void tt_init(
register_and_start_user_services(services, services_count); register_and_start_user_services(services, services_count);
TT_LOG_I(TAG, "tt_init complete"); TT_LOG_I(TAG, "tt_init complete");
} }

View File

@ -1,13 +1,14 @@
#pragma once #pragma once
#include "tactility_core.h" #include "app_manifest.h"
#include "service_manifest.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
__attribute__((unused)) void tt_init( TT_UNUSED void tt_init(
const AppManifest* const* _Nonnull apps, const AppManifest* const* apps,
size_t apps_count, size_t apps_count,
const ServiceManifest* const* services, const ServiceManifest* const* services,
size_t services_count size_t services_count