add apploader example

This commit is contained in:
aanper 2020-10-17 11:48:52 +03:00
parent 3c453a2a20
commit 566ba378ff
5 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#include "flipper.h"
/*
render_loader
handle_input
handle_menu
*/
void app_loader(void* p) {
osThreadId_t self_id = osThreadGetId();
assert(self_id);
printf("[app loader] start\n");
osThreadSuspend(self_id);
}

View File

@ -16,6 +16,7 @@ APP_INPUT = 1
APP_GUI = 1 APP_GUI = 1
CFLAGS += -DAPP_MENU CFLAGS += -DAPP_MENU
C_SOURCES += $(wildcard $(APP_DIR)/menu/*.c) C_SOURCES += $(wildcard $(APP_DIR)/menu/*.c)
C_SOURCES += $(wildcard $(APP_DIR)/app-loader/*.c)
endif endif
APP_TEST ?= 0 APP_TEST ?= 0

View File

@ -27,6 +27,7 @@ void u8g2_qrcode(void* p);
void fatfs_list(void* p); void fatfs_list(void* p);
void gui_task(void* p); void gui_task(void* p);
void backlight_control(void* p); void backlight_control(void* p);
void app_loader(void* p);
const FlipperStartupApp FLIPPER_STARTUP[] = { const FlipperStartupApp FLIPPER_STARTUP[] = {
#ifdef APP_DISPLAY #ifdef APP_DISPLAY
@ -44,6 +45,7 @@ const FlipperStartupApp FLIPPER_STARTUP[] = {
#ifdef APP_MENU #ifdef APP_MENU
{.app = menu_task, .name = "menu_task", .libs = {1, FURI_LIB{"gui_task"}}}, {.app = menu_task, .name = "menu_task", .libs = {1, FURI_LIB{"gui_task"}}},
{.app = app_loader, .name = "app_loader", .libs = {1, FURI_LIB{"menu_task"}}},
#endif #endif
// {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = ""}, // {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = ""},

View File

@ -16,6 +16,8 @@ extern "C" {
} }
#endif #endif
#include <stdio.h>
// Arduino defines // Arduino defines
#define pinMode app_gpio_init #define pinMode app_gpio_init

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include "flipper.h"
#include "api-basic/furi.h" #include "api-basic/furi.h"
//#include "api-basic/flapp.h" //#include "api-basic/flapp.h"
#include "cmsis_os2.h" #include "cmsis_os2.h"