修复类型支持问题和重复定义

This commit is contained in:
NeoZeng
2022-11-19 15:40:38 +08:00
parent acf93052b2
commit 076973f41e
12 changed files with 71 additions and 113 deletions

View File

@@ -1,10 +1,10 @@
#ifndef BSP_BUZZER_H
#define BSP_BUZZER_H
#include "struct_typedef.h"
#include <stdint-gcc.h>
void buzzer_init();
extern void buzzer_on(uint16_t psc, uint16_t pwm,uint8_t level);
extern void buzzer_on(uint16_t psc, uint16_t pwm, uint8_t level);
extern void buzzer_off(void);
#endif

View File

@@ -1,7 +1,7 @@
#ifndef BSP_CAN_H
#define BSP_CAN_H
#include "struct_typedef.h"
#include <stdint-gcc.h>
#include "can.h"
#define MX_REGISTER_DEVICE_CNT 12 // maximum number of device can be registered to CAN service

View File

@@ -1,8 +1,7 @@
#ifndef BSP_LED_H
#define BSP_LED_H
#include "struct_typedef.h"
#include <stdint-gcc.h>
void LED_init();
extern void aRGB_led_show(uint32_t aRGB);

View File

@@ -1,7 +1,7 @@
#ifndef BSP_RC_H
#define BSP_RC_H
#include "struct_typedef.h"
#include <stdint-gcc.h>
#include "main.h"
#define DEVICE_USART_CNT 3 // C板至多分配3个串口

View File

@@ -1,36 +0,0 @@
#ifndef STRUCT_TYPEDEF_H
#define STRUCT_TYPEDEF_H
#ifndef __PACKED
#define __packed __attribute__((pakced))
#endif // !__PACKED
typedef signed char int8_t;
typedef signed short int int16_t;
#ifndef _INT32_T_DECLARED
typedef signed int int32_t;
#define _INT32_T_DECLARED
#endif
typedef signed long long int64_t;
/* exact-width unsigned integer types */
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
#ifndef _UINT32_T_DECLARED
typedef unsigned int uint32_t;
#define _UINT32_T_DECLARED
#endif
typedef unsigned long long uint64_t;
typedef unsigned char bool_t;
typedef float fp32;
typedef double fp64;
#endif