implemented furi from flipper zero
added cmsis_core, furi, mlib and nanobake implemented basic app structure from furi implemented basic placeholder apps
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "desktop.h"
|
||||
#include "nb_hardware.h"
|
||||
#include <esp_lvgl_port.h>
|
||||
#include "core_defines.h"
|
||||
#include <esp_log.h>
|
||||
|
||||
//nb_desktop_t* shared_desktop = NULL;
|
||||
|
||||
static int32_t prv_desktop_main(void* param) {
|
||||
UNUSED(param);
|
||||
printf("desktop app init\n");
|
||||
// nb_desktop_t* desktop = desktop_alloc();
|
||||
// shared_desktop = desktop;
|
||||
|
||||
// lvgl_port_lock(0);
|
||||
//
|
||||
// lv_obj_t* label = lv_label_create(lv_parent);
|
||||
// lv_label_set_recolor(label, true);
|
||||
// lv_obj_set_width(label, (lv_coord_t)platform->display->horizontal_resolution);
|
||||
// lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_LEFT, 0);
|
||||
// lv_label_set_text(label, "Desktop app");
|
||||
// lv_obj_align(label, LV_ALIGN_TOP_LEFT, 0, 0);
|
||||
//
|
||||
// lvgl_port_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
const nb_app_t desktop_app = {
|
||||
.id = "desktop",
|
||||
.name = "Desktop",
|
||||
.type = SERVICE,
|
||||
.entry_point = &prv_desktop_main,
|
||||
.stack_size = 2048,
|
||||
.priority = 10
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "nb_app.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const nb_app_t desktop_app;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "gui.h"
|
||||
#include "core_defines.h"
|
||||
#include "check.h"
|
||||
|
||||
static int32_t prv_gui_main(void* param) {
|
||||
UNUSED(param);
|
||||
printf("gui app init\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const nb_app_t gui_app = {
|
||||
.id = "gui",
|
||||
.name = "GUI",
|
||||
.type = STARTUP,
|
||||
.entry_point = &prv_gui_main,
|
||||
.stack_size = 2048,
|
||||
.priority = 10
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "nb_app.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const nb_app_t gui_app;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "loader.h"
|
||||
#include "core_defines.h"
|
||||
|
||||
static int32_t prv_loader_main(void* param) {
|
||||
UNUSED(param);
|
||||
printf("loader app init\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const nb_app_t loader_app = {
|
||||
.id = "loader",
|
||||
.name = "Loader",
|
||||
.type = STARTUP,
|
||||
.entry_point = &prv_loader_main,
|
||||
.stack_size = 2048,
|
||||
.priority = 10
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "nb_app.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern const nb_app_t loader_app;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user