#ifndef INC_SHORTTIMER_H #define INC_SHORTTIMER_H #ifdef __cplusplus extern "C" { #endif /** * Timer with an arbitrary period. * * shorttimer_callback() must be called in HAL_TIM_PeriodElapsedCallback. */ #include "stm32h7xx_hal.h" #include void shorttimer_init(TIM_HandleTypeDef *handle); uint32_t shorttimer_gettick(void); void shorttimer_sleep(uint32_t microseconds); void shorttimer_callback(void); #ifdef __cplusplus } #endif #endif // INC_SHORTTIMER_H