flipperzero-firmware/firmware/targets/f4/api-hal/api-hal-timebase.h
DrZlo13 cf1c8fb223
[FL-85][FL-446][FL-720] Dallas key blanks and OneWire lib rework (#313)
* sepate one wire class
* TM2004 writer
* app mode write ds1990
* test another blanks protocol
* new ibutton slave
* one wire states
* tim1 capture compare and update interrupts
* interrupt mgr, new timers IRQ
* discard HAL_TIM_PeriodElapsedCallback from main
* add exti_14 line
* add external interrupt callback
* use int mgr in input
* better interrupt managment
* add interrupt callback enable and disable fns
* properly init app
* changed timings
* rename one wire classes
* use new owb classes
* properly remove interrupts
* new blanks writer
* remove unused tests
* new core includes
* extern c guard
* fix api_interrupt_remove usage
* remove debug info, new way to detect blanks writing
* remove copy constructor
* change keys template
* fix app sources recipe
2021-01-28 15:30:31 +03:00

37 lines
758 B
C

#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* 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();
#ifdef __cplusplus
}
#endif