[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
This commit is contained in:
@@ -16,6 +16,25 @@ typedef enum {
|
||||
/* Initialize drivers */
|
||||
void api_hal_power_init();
|
||||
|
||||
/* Get current insomnia level
|
||||
* @return insomnia level: 0 - no insomnia, >0 - insomnia, bearer count.
|
||||
*/
|
||||
uint16_t api_hal_power_insomnia_level();
|
||||
|
||||
/* Enter insomnia mode
|
||||
* Prevents device from going to sleep
|
||||
* @warning Internally increases insomnia level
|
||||
* Must be paired with api_hal_power_insomnia_exit
|
||||
*/
|
||||
void api_hal_power_insomnia_enter();
|
||||
|
||||
/* Exit insomnia mode
|
||||
* Allow device to go to sleep
|
||||
* @warning Internally decreases insomnia level.
|
||||
* Must be paired with api_hal_power_insomnia_enter
|
||||
*/
|
||||
void api_hal_power_insomnia_exit();
|
||||
|
||||
/* Check if deep sleep availble */
|
||||
bool api_hal_power_deep_available();
|
||||
|
||||
|
@@ -4,9 +4,9 @@
|
||||
template <unsigned int N> struct STOP_EXTERNING_ME {};
|
||||
#endif
|
||||
|
||||
#include "api-hal-resources.h"
|
||||
#include "api-hal-timebase.h"
|
||||
#include "api-hal-boot.h"
|
||||
#include "api-hal-os.h"
|
||||
#include "api-hal-resources.h"
|
||||
#include "api-hal-gpio.h"
|
||||
#include "api-hal-delay.h"
|
||||
#include "api-hal-pwm.h"
|
||||
|
Reference in New Issue
Block a user