Applications dependency, initial realization (#159)

This commit is contained in:
DrZlo13
2020-10-05 20:17:34 +10:00
committed by GitHub
parent 44ab04f8d6
commit ec5e5da138
8 changed files with 103 additions and 20 deletions

View File

@@ -171,6 +171,9 @@ void display_u8g2(void* p) {
u8g2_SendBuffer(u8g2);
furi_give(fb_record);
// we ready to work
furiac_ready();
while(1) {
// wait for event
if(xSemaphoreTake(update, 10000) == pdTRUE) {

View File

@@ -14,9 +14,6 @@ static void event_cb(const void* value, size_t size, void* ctx) {
}
void application_input_dump(void* p) {
// TODO try open record and retry on timeout (needs FURI behaviour change)
delay(1000);
// open record
FuriRecordSubscriber* state_record =
furi_open("input_state", false, false, state_cb, NULL, NULL);

View File

@@ -4,9 +4,6 @@
void u8g2_example(void* p) {
FuriRecordSubscriber* log = get_default_log();
// TODO try open record and retry on timeout (needs FURI behaviour change)
delay(1000);
// open record
FuriRecordSubscriber* fb_record = furi_open("u8g2_fb", false, false, NULL, NULL, NULL);

View File

@@ -40,6 +40,8 @@ void input_task(void* p) {
furiac_exit(NULL);
}
// we ready to work
furiac_ready();
initialized = true;
// Force state update

View File

@@ -5,6 +5,7 @@
typedef struct {
FlipperApplication app;
const char* name;
const char* libs;
} FlipperStartupApp;
#ifdef TEST
@@ -27,31 +28,31 @@ void coreglitch_demo_0(void* p);
const FlipperStartupApp FLIPPER_STARTUP[] = {
#ifndef TEST
{.app = display_u8g2, .name = "display_u8g2"},
{.app = u8g2_example, .name = "u8g2_example"},
{.app = display_u8g2, .name = "display_u8g2", .libs = ""},
{.app = u8g2_example, .name = "u8g2_example", .libs = "display_u8g2"},
#endif
#ifdef USE_INPUT
{.app = input_task, .name = "input_task"},
{.app = input_task, .name = "input_task", .libs = ""},
#endif
// {.app = coreglitch_demo_0, .name = "coreglitch_demo_0"},
// {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = ""},
#ifdef TEST
{.app = flipper_test_app, .name = "test app"},
{.app = flipper_test_app, .name = "test app", .libs = ""},
#endif
#ifdef EXAMPLE_BLINK
{.app = application_blink, .name = "blink"},
{.app = application_blink, .name = "blink", .libs = ""},
#endif
#ifdef EXAMPLE_UART_WRITE
{.app = application_uart_write, .name = "uart write"},
{.app = application_uart_write, .name = "uart write", .libs = ""},
#endif
#ifdef EXAMPLE_IPC
{.app = application_ipc_display, .name = "ipc display"},
{.app = application_ipc_widget, .name = "ipc widget"},
{.app = application_ipc_display, .name = "ipc display", .libs = ""},
{.app = application_ipc_widget, .name = "ipc widget", .libs = ""},
#endif
#ifdef EXAMPLE_INPUT_DUMP
{.app = application_input_dump, .name = "input dump"},
{.app = application_input_dump, .name = "input dump", .libs = "input_task"},
#endif
};