Files
Motor_v2/Robot_V2/device/Timer.h
T

62 lines
1.1 KiB
C++
Raw Normal View History

/**
* @file device/Timer.h
* @brief 底层设备驱动与外设封装源文件
* @note 本文件仅补充 Doxygen 文档注释,不改变代码逻辑。
*/
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
/**
* @brief User_timer_init 函数
* @return void
*/
2025-09-23 00:27:51 +08:00
void User_timer_init(void);
/**
* @brief Set_Pwm 函数
* @param[in] channel 参数
* @param[in] duty_cycle 参数
* @return void
*/
2026-01-24 01:50:39 +08:00
void Set_Pwm(u16 channel, float duty_cycle);
/**
* @brief Set_3Pwm 函数
* @param[in] duty_cycle0 参数
* @param[in] duty_cycle1 参数
* @param[in] duty_cycle2 参数
* @return void
*/
2025-10-16 21:43:34 +08:00
void Set_3Pwm(float duty_cycle0, float duty_cycle1,float duty_cycle2);
/**
* @brief TIMER2 中断处理函数
* @return void
*/
2025-10-16 21:43:34 +08:00
void TIMER2_IRQHandler(void);
/**
* @brief timer1_pwm_config 函数
* @return void
*/
2025-10-16 21:43:34 +08:00
void timer1_pwm_config(void);
/**
* @brief timer1_gpio_config 函数
* @return void
*/
2025-10-16 21:43:34 +08:00
void timer1_gpio_config(void);
/**
* @brief TIMER1 中断处理函数
* @return 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