flipperzero-firmware/core/flipper.c
あく b835d7a451
[FL-872] Furi, API-HAL, App-Loader cleanup and improvements (#334)
* Furi: replace obsolete furiac_exit with osThreadExit, drop obsolete apis and test. Rename systemd to flipper and move to separate file, cleanup. ApiHal: Rename timebase to os and move freertos hooks there, move insomnia api to power module.
* Furi: new thread helper
* Furi: cleanup thread documentation
* Flipper, AppLoader: update to use FuriThread. Update tasks signatures to match FuriThreadCallback signature.
* F4: rename API_HAL_TIMEBASE_DEBUG to API_HAL_OS_DEBUG
* Applications: rename FuriApplication to FlipperApplication, use FuriThreadCallback signature for apps.
* C++ app template sample, new exit method
2021-02-12 20:24:34 +03:00

26 lines
816 B
C

#include "flipper.h"
#include <applications.h>
#include <furi.h>
void flipper_init() {
printf("[flipper] Build date:" BUILD_DATE ". "
"Git Commit:" GIT_COMMIT ". "
"Git Branch:" GIT_BRANCH ". "
"Commit Number:" GIT_BRANCH_NUM "\r\n");
printf("[flipper] starting services\r\n");
for(size_t i = 0; i < FLIPPER_SERVICES_COUNT; i++) {
printf("[flipper] starting service %s\r\n", FLIPPER_SERVICES[i].name);
FuriThread* thread = furi_thread_alloc();
furi_thread_set_name(thread, FLIPPER_SERVICES[i].name);
furi_thread_set_stack_size(thread, FLIPPER_SERVICES[i].stack_size);
furi_thread_set_callback(thread, FLIPPER_SERVICES[i].app);
furi_thread_start(thread);
}
printf("[flipper] services startup complete\r\n");
}