Reduce display startup time
This commit is contained in:
		
							
								
								
									
										28
									
								
								Core/Inc/shorttimer.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Core/Inc/shorttimer.h
									
									
									
									
									
										Normal 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
 | 
			
		||||
@ -59,6 +59,7 @@ void FDCAN1_IT1_IRQHandler(void);
 | 
			
		||||
void EXTI9_5_IRQHandler(void);
 | 
			
		||||
void TIM6_DAC_IRQHandler(void);
 | 
			
		||||
void LTDC_IRQHandler(void);
 | 
			
		||||
void TIM17_IRQHandler(void);
 | 
			
		||||
/* USER CODE BEGIN EFP */
 | 
			
		||||
 | 
			
		||||
/* USER CODE END EFP */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user