2025-09-23 00:27:51 +08:00
|
|
|
#ifndef _TIMER_H
|
|
|
|
|
#define _TIMER_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2026-01-24 01:50:39 +08:00
|
|
|
#include <cstdint>
|
2025-09-23 00:27:51 +08:00
|
|
|
|
|
|
|
|
void User_timer_init(void);
|
2026-01-24 01:50:39 +08:00
|
|
|
void Set_Pwm(u16 channel, float duty_cycle);
|
2025-10-16 21:43:34 +08:00
|
|
|
void Set_3Pwm(float duty_cycle0, float duty_cycle1,float duty_cycle2);
|
|
|
|
|
void TIMER2_IRQHandler(void);
|
|
|
|
|
|
|
|
|
|
void timer1_pwm_config(void);
|
|
|
|
|
void timer1_gpio_config(void);
|
2025-11-22 02:21:33 +08:00
|
|
|
void TIMER1_IRQHandler(void); // 添加TIMER1中断处理函数声明
|
|
|
|
|
|
2025-09-23 00:27:51 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-11-22 02:21:33 +08:00
|
|
|
#endif
|