b49c9ab0c6
完整实现了以下模块: - 系统数据总线(sys_data_bus)模块间通信 - UART/USART/LPUART驱动 + RS485半双工 - I2C驱动(AS5600角度传感器 + AT24C02 EEPROM) - Modbus RTU从站协议 - 步进电机微步进控制(正弦/余弦换相+S曲线加减速) - 到位开关驱动(DI_MIN/DI_MAX) - PGA+ADC电流检测 - 系统监控任务(内存/串口/传感器/任务状态) - LED/Key外设驱动 - 基于CMake + arm-none-eabi-gcc构建系统
53 lines
892 B
C
53 lines
892 B
C
#ifndef __CMSIS_COMPILER_H__
|
|
#define __CMSIS_COMPILER_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
#define __I volatile const
|
|
#define __O volatile
|
|
#define __IO volatile
|
|
|
|
#define __IM volatile const
|
|
#define __OM volatile
|
|
#define __IOM volatile
|
|
|
|
#define __CLZ __builtin_clz
|
|
|
|
#ifndef __ASM
|
|
#define __ASM __asm
|
|
#endif
|
|
|
|
#ifndef __INLINE
|
|
#define __INLINE inline
|
|
#endif
|
|
|
|
#ifndef __STATIC_INLINE
|
|
#define __STATIC_INLINE static inline
|
|
#endif
|
|
|
|
#ifndef __NO_RETURN
|
|
#define __NO_RETURN __attribute__((__noreturn__))
|
|
#endif
|
|
|
|
#ifndef __USED
|
|
#define __USED __attribute__((used))
|
|
#endif
|
|
|
|
#ifndef __WEAK
|
|
#define __WEAK __attribute__((weak))
|
|
#endif
|
|
|
|
#ifndef __UNALIGNED_UINT32
|
|
#define __UNALIGNED_UINT32(x) (*((volatile uint32_t *)(x)))
|
|
#endif
|
|
|
|
#ifndef __PACKED
|
|
#define __PACKED __attribute__((packed))
|
|
#endif
|
|
|
|
#ifndef __ALIGNED
|
|
#define __ALIGNED(x) __attribute__((aligned(x)))
|
|
#endif
|
|
|
|
#endif
|