Files
CHJ/user/MCU/lhl_lptimer.h

42 lines
1.5 KiB
C
Raw Normal View History

2026-03-20 21:16:58 +08:00
#ifndef __LHL_LPTIMER_H__
#define __LHL_LPTIMER_H__
/*==================================================================================*/
//ϵͳ<CFB5><CDB3><EFBFBD>ض<EFBFBD><D8B6><EFBFBD>
/*==================================================================================*/
#define LPTIM1 pLPTIM1
#define LPTIM2 pLPTIM2
/*==================================================================================*/
//ϵͳ<CFB5><EFBFBD><EAB6A8>
/*==================================================================================*/
#define LPTIM_CLK_ENABLE_LSE 0 //<2F>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>0:<3A><>ʹ<EFBFBD><CAB9>,ʹ<><CAB9><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/*==================================================================================*/
//USER
/*==================================================================================*/
2026-03-20 21:19:04 +08:00
#define PrimaryTimer LPTIM1
#define StartPrimaryTimerInterval( uploadCounter ) StartLPTimer1(uploadCounter )
#define ResetPrimaryTimerInterval( uploadCounter ) ResetLPTimer1(uploadCounter)
2026-03-20 21:16:58 +08:00
void StartLPTimer1(u16 uploadCounter);
void ResetLPTimer1(u16 uploadCounter);
void StartLPTimer2(u16 uploadCounter);
void ResetLPTimer2(u16 uploadCounter);
2026-03-20 21:19:04 +08:00
2026-03-20 21:16:58 +08:00
/*==================================================================================*/
//<2F>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
/*==================================================================================*/
typedef void (*lptimer_irq_callback_t)(void);
void lptimer_register_irq_callback (LPTIM_TypeDef *lptimer,lptimer_irq_callback_t lptim_irq_callback);
#endif