mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-21 02:03:18 +00:00
c8aca9ef48
* SYSTEM: tickless mode with deep sleep. * Move FreeRTOS ticks to lptim2. * API: move all sumbodules init routines to one place. * Timebase: working lptim2 at tick source. * API Timebase: lp-timer routines, timer access safe zones prediction and synchronization. * FreeRTOS: adjust configuration for tickless mode. * NFC: support for tickless mode. * API Timebase: improve tick error handling in IRQ. * Apploader: use insomnia mode to run applications. * BLE: prevent sleep while core2 starting. * HAL: nap while in insomnia mode. Co-authored-by: coreglitch <mail@s3f.ru>
27 lines
No EOL
687 B
C
27 lines
No EOL
687 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Initialize timebase
|
|
* Configure and start tick timer
|
|
*/
|
|
void api_hal_timebase_init();
|
|
|
|
/* Get current insomnia level
|
|
* @return insomnia level: 0 - no insomnia, >0 - insomnia, bearer count.
|
|
*/
|
|
uint16_t api_hal_timebase_insomnia_level();
|
|
|
|
/* Enter insomnia mode
|
|
* Prevents device from going to sleep
|
|
* @warning Internally increases insomnia level
|
|
* Must be paired with api_hal_timebase_insomnia_exit
|
|
*/
|
|
void api_hal_timebase_insomnia_enter();
|
|
|
|
/* Exit insomnia mode
|
|
* Allow device to go to sleep
|
|
* @warning Internally decreases insomnia level.
|
|
* Must be paired with api_hal_timebase_insomnia_enter
|
|
*/
|
|
void api_hal_timebase_insomnia_exit(); |