Reduce display startup time

This commit is contained in:
2023-03-17 17:50:00 +01:00
parent 98f4a1d0ad
commit 7e4bc54266
10 changed files with 172 additions and 12 deletions

28
Core/Inc/shorttimer.h Normal file
View File

@ -0,0 +1,28 @@
#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 <stdint.h>
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