stm32f10x.h文件分析理解
时间:11-10
来源:互联网
点击:

为兼容旧版本类似而生。

@addtogroup Exported_types/*!< STM32F10x Standard Peripheral Library old types (maintained for legacy purpose) */typedef int32_t s32;typedef int16_t s16;typedef int8_t s8;typedef const int32_t sc32; /*!< Read Only */typedef const int16_t sc16; /*!< Read Only */typedef const int8_t sc8; /*!< Read Only */typedef __IO int32_t vs32;typedef __IO int16_t vs16;typedef __IO int8_t vs8;typedef __I int32_t vsc32; /*!< Read Only */typedef __I int16_t vsc16; /*!< Read Only */typedef __I int8_t vsc8; /*!< Read Only */typedef uint32_t u32;typedef uint16_t u16;typedef uint8_t u8;typedef const uint32_t uc32; /*!< Read Only */typedef const uint16_t uc16; /*!< Read Only */typedef const uint8_t uc8; /*!< Read Only */typedef __IO uint32_t vu32;typedef __IO uint16_t vu16;typedef __IO uint8_t vu8;typedef __I uint32_t vuc32; /*!< Read Only */typedef __I uint16_t vuc16; /*!< Read Only */typedef __I uint8_t vuc8; /*!< Read Only */typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;/*!< STM32F10x Standard Peripheral Library old definitions (maintained for legacy purpose) */#define HSEStartUp_TimeOut HSE_STARTUP_TIMEOUT#define HSE_Value HSE_VALUE#define HSI_Value HSI_VALUE
把全部外设寄存器定义成结构体

/* @addtogroup Peripheral_registers_structures */ /** * @brief Analog to Digital Converter */typedef struct{} ADC_TypeDef;/** * @brief Backup Registers */typedef struct{} BKP_TypeDef;/** * @brief Controller Area Network TxMailBox */typedef struct{} CAN_TxMailBox_TypeDef;/** * @brief Controller Area Network FIFOMailBox */typedef struct{} CAN_FIFOMailBox_TypeDef;/** * @brief Controller Area Network FilterRegister */typedef struct{} CAN_FilterRegister_TypeDef;/** * @brief Controller Area Network */typedef struct{} CAN_TypeDef;/** * @brief Consumer Electronics Control (CEC)*/typedef struct{} CEC_TypeDef;/** * @brief CRC calculation unit */typedef struct{} CRC_TypeDef;/** * @brief Digital to Analog Converter*/typedef struct{} DAC_TypeDef;/** * @brief Debug MCU*/typedef struct{}DBGMCU_TypeDef;/** * @brief DMA Controller*/typedef struct{} DMA_Channel_TypeDef;typedef struct{} DMA_TypeDef;/** * @brief Ethernet MAC*/typedef struct{} ETH_TypeDef;/** * @brief External Interrupt/Event Controller*/typedef struct{} EXTI_TypeDef;/** * @brief FLASH Registers*/typedef struct{} FLASH_TypeDef;/** * @brief Option Bytes Registers*/typedef struct{} OB_TypeDef;/** * @brief Flexible Static Memory Controller*/typedef struct{} FSMC_Bank1_TypeDef; /** * @brief Flexible Static Memory Controller Bank1E*/typedef struct{} FSMC_Bank1E_TypeDef;/** * @brief Flexible Static Memory Controller Bank2*/typedef struct{} FSMC_Bank2_TypeDef; /** * @brief Flexible Static Memory Controller Bank3*/typedef struct{} FSMC_Bank3_TypeDef; /** * @brief General Purpose I/O*/typedef struct{} GPIO_TypeDef;/** * @brief Alternate Function I/O*/typedef struct{} AFIO_TypeDef;/** * @brief Inter Integrated Circuit Interface*/typedef struct{} I2C_TypeDef;/** * @brief Independent WATCHDOG*/typedef struct{} IWDG_TypeDef;/** * @brief Power Control*/typedef struct{} PWR_TypeDef;/** * @brief Reset and Clock Control*/typedef struct{} RCC_TypeDef;/** * @brief Real-Time Clock*/typedef struct{} RTC_TypeDef;/** * @brief SD host Interface*/typedef struct{} SDIO_TypeDef;/** * @brief Serial Peripheral Interface*/typedef struct{} SPI_TypeDef;/** * @brief TIM*/typedef struct{} TIM_TypeDef;/** * @brief Universal Synchronous Asynchronous Receiver Transmitter*/typedef struct{} USART_TypeDef;/** * @brief Window WATCHDOG*/typedef struct{} WWDG_TypeDef; - STM32F10x 使用SysTick的延时函数(12-02)
- 基于STM32F10x的uC/GUI初始化设置(12-02)
- 基于正点原子建立STM32F10x库函数版本的工程自己例程(11-28)
- 启动过程都在这个文件的开头描述了system_stm32f10x.c(11-27)
- stm32f10x_it.c 定义的程序列表,编程时参考(11-27)
- stm32f10x的AD配置(11-26)
