mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-02 17:29:14 +00:00
1.2 KiB
1.2 KiB
One of the most important component of Flipper Core is FURI (Flipper Universal Registry Implementation). It helps control the applications flow, make dynamic linking and interaction between applications.
In fact, FURI is just wrapper around RTOS thread management and mutexes, and callback management.
In this article we create few application, interact between apps, use OS functions and interact with HAL.
Simple Blink app
First, let's create a simple led blinking application.
General agreements
Flipper application is just a function:
void application_name(void* p) {
// Setup
while(1) {
// Loop
}
}
void* p
is arbitrary pointer that may be used for pass parameters to application at launch (like argc/argv in POSIX).- Application must never attempt to return or exit from their implementing function.
- Avoid long cycles without any "waits" or "blocking" like
delay
orxQueueReceive
, otherwise your app will blocking overall Flipper work. - Do not create static variables inside function or global variables. Use only local variables. We plan to add virual in-RAM filesystem to save any persistent data.