refactor(build): 更新项目配置和链接器设置 - 修改GD32C103CB的ROM基地址和大小配置 - 更新系统时钟向量表偏移量设置 - 在cproject.yml中添加BIN输出格式支持 - 增加-O3优化级别和代码移除选项 - 更新csolution版本依赖 feat(device): 优化ADC采样和配置管理 - 将DengFOC依赖替换为FOC模块 - 从config.h引入配置常量 - 重命名FILTER_SIZE为ADC_FILTER_SIZE以提高清晰度 - 优化温度和电流采样滤波实现 refactor(algorithm): 简化FOC控制函数接口 - 为angle_control、velocity_control等函数移除不必要的参数 - 统一函数指针类型定义 - 优化电流计算函数的代码格式 - 调整PID控制器初始化参数
23 lines
443 B
C
23 lines
443 B
C
#ifndef _TIMER_H
|
|
#define _TIMER_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
|
|
void User_timer_init(void);
|
|
void Set_Pwm(uint16_t channel, float duty_cycle);
|
|
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);
|
|
void TIMER1_IRQHandler(void); // 添加TIMER1中断处理函数声明
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |