重新配置CAN引脚映射并实现基于DMA的数据收发机制,提升通信效率。增加了DMA通道4和5的中断处理函数,用于接收和发送CAN消息。修改了CAN发送函数以支持DMA传输,并去除了原有的轮询等待机制。 feat(ADC): 重新实现ADC与DMA初始化配置 将ADC和DMA的配置迁移至ADC.cpp文件中,完善了DMA循环采样模式配置及ADC多通道扫描功能。删除了initial.cpp中重复的初始化代码,并修正了相关头文件包含。 chore(headers): 清理冗余头文件引用 多个源文件中删除了不必要的标准库和硬件无关头文件引用,减少编译依赖,提高代码清晰度。
26 lines
451 B
C
26 lines
451 B
C
#ifndef _INITIAL_H
|
|
#define _INITIAL_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#include "stdint.h"
|
|
#include <stdio.h>
|
|
#include "gd32c10x_eval.h"
|
|
|
|
void rcu_config(void);
|
|
static volatile uint32_t timer_delay_count = 0; // volatile 很重要!
|
|
int fputc(int ch, FILE *f); // 声明fputc函数以重载标准库实现
|
|
|
|
u8 tle5210b_init(void);
|
|
u8 USART0_init(void);
|
|
u8 watchdog_init(u32 time);
|
|
void driver_init(void);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|