Files
Motor_v2/Robot_V2/sys/initial.h
T

31 lines
625 B
C++
Raw Normal View History

2025-09-23 00:27:51 +08:00
#ifndef _INITIAL_H
#define _INITIAL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stdint.h"
#include <stdio.h>
#include "gd32c10x_eval.h"
constexpr u16 REDUCTION_RATIO = 25;
constexpr float DEG2RAD = 1.0f / 360.0f * 6.28318530718f;
constexpr float RAD2DEG = 360.0f / 6.28318530718f;
2025-09-23 00:27:51 +08:00
void rcu_config(void);
2025-10-02 02:52:07 +08:00
static volatile uint32_t timer_delay_count = 0; // volatile 很重要!
2025-09-23 00:27:51 +08:00
int fputc(int ch, FILE *f); // 声明fputc函数以重载标准库实现
u8 tle5210b_init(void);
u8 USART0_init(void);
u8 watchdog_init(u32 time);
2025-10-16 21:43:34 +08:00
void driver_init(void);
2025-11-02 01:54:01 +08:00
void angsens_MG_test(void);
2025-10-16 21:43:34 +08:00
2025-09-23 00:27:51 +08:00
#ifdef __cplusplus
}
#endif
#endif