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:
parent
0c724e2e68
commit
e2209ccba8
13
README.md
13
README.md
@ -56,10 +56,17 @@ The build scripts will detect if ESP-IDF is available. They will adapter if you
|
||||
|
||||
### 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:
|
||||
- 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
|
||||
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
#include "services/gui/gui.h"
|
||||
#include "services/loader/loader.h"
|
||||
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
UNUSED(app);
|
||||
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
lv_obj_t* label = lv_label_create(parent);
|
||||
lv_label_set_recolor(label, true);
|
||||
lv_obj_set_width(label, 200);
|
||||
|
||||
@ -11,7 +11,7 @@ extern const ServiceManifest wifi_service;
|
||||
extern const AppManifest wifi_connect_app;
|
||||
extern const AppManifest wifi_manage_app;
|
||||
|
||||
__attribute__((unused)) void app_main(void) {
|
||||
TT_UNUSED void app_main(void) {
|
||||
static const Config config = {
|
||||
/**
|
||||
* 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
|
||||
};
|
||||
|
||||
tt_core_init();
|
||||
tt_esp_init(&config);
|
||||
tt_init(&config.apps, CONFIG_APPS_LIMIT, &config.services, CONFIG_SERVICES_LIMIT);
|
||||
|
||||
|
||||
@ -5,3 +5,6 @@ add_executable(app-sim ${SOURCES})
|
||||
target_link_libraries(app-sim PRIVATE tactility)
|
||||
target_link_libraries(app-sim PRIVATE tactility-core)
|
||||
|
||||
add_definitions(-D_Nullable=)
|
||||
add_definitions(-D_Nonnull=)
|
||||
|
||||
|
||||
@ -1,26 +1,17 @@
|
||||
#include "log.h"
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "log.h"
|
||||
#include "portmacro.h"
|
||||
#include "tactility.h"
|
||||
#include "task.h"
|
||||
|
||||
|
||||
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
||||
{
|
||||
void vAssertCalled(TT_UNUSED unsigned long line, TT_UNUSED const char* const file) {
|
||||
static portBASE_TYPE xPrinted = pdFALSE;
|
||||
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
|
||||
|
||||
/* Parameters are not used. */
|
||||
( void ) ulLine;
|
||||
( void ) pcFileName;
|
||||
volatile uint32_t set_to_nonzero_in_debugger_to_continue = 0;
|
||||
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
/* You can step out of this function to debug the assertion by using
|
||||
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
|
||||
value. */
|
||||
while( ulSetToNonZeroInDebuggerToContinue == 0 )
|
||||
{
|
||||
// Step out by attaching a debugger and setting set_to_nonzero_in_debugger_to_continue
|
||||
while (set_to_nonzero_in_debugger_to_continue == 0) { /* NO-OP */
|
||||
}
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "core.h"
|
||||
#include "event_flag.h"
|
||||
|
||||
typedef EventFlag* ApiLock;
|
||||
|
||||
|
||||
@ -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");
|
||||
}
|
||||
@ -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
|
||||
@ -8,18 +8,20 @@
|
||||
#include "portmacro.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TT_RETURNS_NONNULL __attribute__((returns_nonnull))
|
||||
|
||||
#define TT_WARN_UNUSED __attribute__((warn_unused_result))
|
||||
|
||||
#define TT_UNUSED __attribute__((unused))
|
||||
|
||||
#define TT_WEAK __attribute__((weak))
|
||||
|
||||
#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?
|
||||
#ifdef ESP_TARGET
|
||||
#define TT_IS_IRQ_MODE() (xPortInIsrContext() == pdTRUE)
|
||||
@ -30,7 +32,3 @@ extern "C" {
|
||||
#define TT_IS_ISR() (TT_IS_IRQ_MODE())
|
||||
|
||||
#define TT_CHECK_RETURN __attribute__((__warn_unused_result__))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,114 +1,62 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) \
|
||||
#define TT_MAX(a, b) \
|
||||
({ \
|
||||
__typeof__(a) _a = (a); \
|
||||
__typeof__(b) _b = (b); \
|
||||
_a > _b ? _a : _b; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) \
|
||||
#define TT_MIN(a, b) \
|
||||
({ \
|
||||
__typeof__(a) _a = (a); \
|
||||
__typeof__(b) _b = (b); \
|
||||
_a < _b ? _a : _b; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(a) ({ (a) < 0 ? -(a) : (a); })
|
||||
#endif
|
||||
#define TT_ABS(a) ({ (a) < 0 ? -(a) : (a); })
|
||||
|
||||
#ifndef ROUND_UP_TO
|
||||
#define ROUND_UP_TO(a, b) \
|
||||
#define TT_ROUND_UP_TO(a, b) \
|
||||
({ \
|
||||
__typeof__(a) _a = (a); \
|
||||
__typeof__(b) _b = (b); \
|
||||
_a / _b + !!(_a % _b); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x, upper, lower) (MIN(upper, MAX(x, lower)))
|
||||
#endif
|
||||
#define TT_CLAMP(x, upper, lower) (TT_MIN(upper, TT_MAX(x, lower)))
|
||||
|
||||
#ifndef COUNT_OF
|
||||
#define COUNT_OF(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
#define TT_COUNT_OF(x) (sizeof(x) / sizeof(x[0]))
|
||||
|
||||
#ifndef TT_SWAP
|
||||
#define TT_SWAP(x, y) \
|
||||
do { \
|
||||
typeof(x) SWAP = x; \
|
||||
x = y; \
|
||||
y = SWAP; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef PLACE_IN_SECTION
|
||||
#define PLACE_IN_SECTION(x) __attribute__((section(x)))
|
||||
#endif
|
||||
#define TT_STRINGIFY(x) #x
|
||||
|
||||
#ifndef ALIGN
|
||||
#define ALIGN(n) __attribute__((aligned(n)))
|
||||
#endif
|
||||
#define TT_TOSTRING(x) TT_STRINGIFY(x)
|
||||
|
||||
#ifndef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
#endif
|
||||
#define TT_CONCATENATE(a, b) CONCATENATE_(a, b)
|
||||
#define TT_CONCATENATE_(a, b) a##b
|
||||
|
||||
#ifndef UNUSED
|
||||
#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) \
|
||||
#define TT_REVERSE_BYTES_U32(x) \
|
||||
((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | \
|
||||
(((x) & 0xFF000000) >> 24))
|
||||
#endif
|
||||
|
||||
#ifndef TT_BIT
|
||||
#define TT_BIT(x, n) (((x) >> (n)) & 1)
|
||||
#endif
|
||||
|
||||
#ifndef TT_BIT_SET
|
||||
#define TT_BIT_SET(x, n) \
|
||||
({ \
|
||||
__typeof__(x) _x = (1); \
|
||||
(x) |= (_x << (n)); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#ifndef TT_BIT_CLEAR
|
||||
#define TT_BIT_CLEAR(x, n) \
|
||||
({ \
|
||||
__typeof__(x) _x = (1); \
|
||||
(x) &= ~(_x << (n)); \
|
||||
})
|
||||
#endif
|
||||
|
||||
#define TT_SW_MEMBARRIER() asm volatile("" : : : "memory")
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
/** @file:m_cstr_dup.h
|
||||
* @brief Helpers for mlib
|
||||
*/
|
||||
#pragma once
|
||||
#include <m-core.h>
|
||||
|
||||
|
||||
@ -3,13 +3,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "app.h"
|
||||
#include "check.h"
|
||||
#include "core.h"
|
||||
#include "core_defines.h"
|
||||
#include "core_extra_defines.h"
|
||||
#include "core_types.h"
|
||||
#include "critical.h"
|
||||
#include "event_flag.h"
|
||||
#include "log.h"
|
||||
#include "service.h"
|
||||
|
||||
@ -12,8 +12,7 @@
|
||||
// Forward declarations
|
||||
static void wifi_connect_event_callback(const void* message, void* context);
|
||||
|
||||
static void on_connect(const char* ssid, const char* password, void* parameter) {
|
||||
UNUSED(parameter);
|
||||
static void on_connect(const char* ssid, const char* password, TT_UNUSED void* parameter) {
|
||||
wifi_connect(ssid, password);
|
||||
}
|
||||
|
||||
|
||||
@ -17,8 +17,7 @@ static void show_keyboard(lv_event_t* event) {
|
||||
lv_obj_scroll_to_view(event->current_target, LV_ANIM_ON);
|
||||
}
|
||||
|
||||
static void hide_keyboard(lv_event_t* event) {
|
||||
UNUSED(event);
|
||||
static void hide_keyboard(TT_UNUSED lv_event_t* event) {
|
||||
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) {
|
||||
UNUSED(view);
|
||||
UNUSED(bindings);
|
||||
UNUSED(state);
|
||||
void wifi_connect_view_update(
|
||||
TT_UNUSED WifiConnectView* view,
|
||||
TT_UNUSED WifiConnectBindings* bindings,
|
||||
TT_UNUSED WifiConnectState* state
|
||||
) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@ -155,7 +155,7 @@ void wifi_get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* res
|
||||
} else {
|
||||
uint16_t i = 0;
|
||||
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) {
|
||||
memcpy(records[i].ssid, wifi_singleton->scan_list[i].ssid, 33);
|
||||
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);
|
||||
}
|
||||
|
||||
static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
|
||||
UNUSED(arg);
|
||||
static void event_handler(TT_UNUSED void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
|
||||
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
|
||||
TT_LOG_I(TAG, "event_handler: sta start");
|
||||
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);
|
||||
uint16_t record_count = wifi->scan_list_limit;
|
||||
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;
|
||||
TT_LOG_I(TAG, "Scanned %u APs. Showing %u:", record_count, safe_record_count);
|
||||
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
|
||||
_Noreturn int32_t wifi_main(void* p) {
|
||||
UNUSED(p);
|
||||
|
||||
_Noreturn int32_t wifi_main(TT_UNUSED void* parameter) {
|
||||
TT_LOG_I(TAG, "Started main loop");
|
||||
tt_check(wifi_singleton != NULL);
|
||||
Wifi* wifi = wifi_singleton;
|
||||
@ -562,14 +559,12 @@ _Noreturn int32_t wifi_main(void* p) {
|
||||
}
|
||||
}
|
||||
|
||||
static void wifi_service_start(Service service) {
|
||||
UNUSED(service);
|
||||
static void wifi_service_start(TT_UNUSED Service service) {
|
||||
tt_check(wifi_singleton == NULL);
|
||||
wifi_singleton = wifi_alloc();
|
||||
}
|
||||
|
||||
static void wifi_service_stop(Service service) {
|
||||
UNUSED(service);
|
||||
static void wifi_service_stop(TT_UNUSED Service service) {
|
||||
tt_check(wifi_singleton != NULL);
|
||||
|
||||
WifiRadioState state = wifi_singleton->radio_state;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#include "tactility.h"
|
||||
|
||||
#include "core.h"
|
||||
#include "graphics_i.h"
|
||||
#include "devices_i.h" // TODO: Rename to hardware*.*
|
||||
#include "nvs_flash.h"
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include "core_defines.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -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);
|
||||
}
|
||||
|
||||
static void desktop_show(App app, lv_obj_t* parent) {
|
||||
UNUSED(app);
|
||||
|
||||
static void desktop_show(TT_UNUSED App app, TT_UNUSED lv_obj_t* parent) {
|
||||
lv_obj_t* list = lv_list_create(parent);
|
||||
lv_obj_set_size(list, LV_PCT(100), LV_PCT(100));
|
||||
lv_obj_center(list);
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
#include "lvgl.h"
|
||||
#include "thread.h"
|
||||
|
||||
static void app_show(App app, lv_obj_t* parent) {
|
||||
UNUSED(app);
|
||||
|
||||
static void app_show(TT_UNUSED App app, lv_obj_t* parent) {
|
||||
lv_obj_t* heap_info = lv_label_create(parent);
|
||||
lv_label_set_recolor(heap_info, true);
|
||||
lv_obj_set_width(heap_info, 200);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include "tactility_core.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -15,7 +15,7 @@ typedef struct {
|
||||
/**
|
||||
* 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.
|
||||
@ -4,6 +4,7 @@
|
||||
#include "m_cstr_dup.h"
|
||||
#include "mutex.h"
|
||||
#include "service_i.h"
|
||||
#include "service_manifest.h"
|
||||
#include "tactility_core.h"
|
||||
|
||||
#define TAG "service_registry"
|
||||
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "service_manifest.h"
|
||||
#include "tactility_core.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -118,8 +118,7 @@ void gui_hide_app() {
|
||||
gui_unlock();
|
||||
}
|
||||
|
||||
static int32_t gui_main(void* p) {
|
||||
UNUSED(p);
|
||||
static int32_t gui_main(TT_UNUSED void* p) {
|
||||
tt_check(gui);
|
||||
Gui* local_gui = gui;
|
||||
|
||||
@ -146,18 +145,14 @@ static int32_t gui_main(void* p) {
|
||||
|
||||
// region AppManifest
|
||||
|
||||
static void gui_start(Service service) {
|
||||
UNUSED(service);
|
||||
|
||||
static void gui_start(TT_UNUSED Service service) {
|
||||
gui = gui_alloc();
|
||||
|
||||
tt_thread_set_priority(gui->thread, ThreadPriorityNormal);
|
||||
tt_thread_start(gui->thread);
|
||||
}
|
||||
|
||||
static void gui_stop(Service service) {
|
||||
UNUSED(service);
|
||||
|
||||
static void gui_stop(TT_UNUSED Service service) {
|
||||
gui_lock();
|
||||
|
||||
ThreadId thread_id = tt_thread_get_id(gui->thread);
|
||||
|
||||
@ -263,9 +263,7 @@ static void loader_do_stop_app() {
|
||||
}
|
||||
|
||||
|
||||
static int32_t loader_main(void* p) {
|
||||
UNUSED(p);
|
||||
|
||||
static int32_t loader_main(TT_UNUSED void* parameter) {
|
||||
LoaderMessage message;
|
||||
bool exit_requested = false;
|
||||
while (!exit_requested) {
|
||||
@ -298,8 +296,7 @@ static int32_t loader_main(void* p) {
|
||||
|
||||
// region AppManifest
|
||||
|
||||
static void loader_start(Service service) {
|
||||
UNUSED(service);
|
||||
static void loader_start(TT_UNUSED Service service) {
|
||||
tt_check(loader_singleton == NULL);
|
||||
loader_singleton = loader_alloc();
|
||||
|
||||
@ -307,8 +304,7 @@ static void loader_start(Service service) {
|
||||
tt_thread_start(loader_singleton->thread);
|
||||
}
|
||||
|
||||
static void loader_stop(Service service) {
|
||||
UNUSED(service);
|
||||
static void loader_stop(TT_UNUSED Service service) {
|
||||
tt_check(loader_singleton != NULL);
|
||||
|
||||
// Send stop signal to thread and wait for thread to finish
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "tactility.h"
|
||||
|
||||
#include "app_manifest_registry.h"
|
||||
#include "core.h"
|
||||
#include "service_registry.h"
|
||||
|
||||
#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,
|
||||
size_t apps_count,
|
||||
const ServiceManifest* const* services,
|
||||
size_t services_count
|
||||
) {
|
||||
tt_service_registry_init();
|
||||
tt_app_manifest_registry_init();
|
||||
|
||||
TT_LOG_I(TAG, "tt_init started");
|
||||
// Register all apps
|
||||
register_system_services();
|
||||
@ -83,4 +85,3 @@ __attribute__((unused)) void tt_init(
|
||||
register_and_start_user_services(services, services_count);
|
||||
TT_LOG_I(TAG, "tt_init complete");
|
||||
}
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "tactility_core.h"
|
||||
#include "app_manifest.h"
|
||||
#include "service_manifest.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__attribute__((unused)) void tt_init(
|
||||
const AppManifest* const* _Nonnull apps,
|
||||
TT_UNUSED void tt_init(
|
||||
const AppManifest* const* apps,
|
||||
size_t apps_count,
|
||||
const ServiceManifest* const* services,
|
||||
size_t services_count
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user