您的位置:首页 > 其它

stm32f10x_map.h(3.1以后不再使用)阅读记录 (对比老版的stm32f10x_map.h和3.5.0版stm32f10x.h)

2014-05-13 17:46 1006 查看
首先说明:stm32f10x_map.h 在3.1以后不再使用,其中的寄存器设置等等 被写入stm32f10x.h中,今后将直接调用stm32f10x.h。

本文目的在于固件库升级。

看看stm32f10x_map.h(固件库2.0.1)的东西,是不是都在stm32f10x.h(固件库3.5.0)里,或者有什么改动,结果是:

【详】typedef部分

都有的,且内容完全相同的typedef:

ADC_TypeDef

BKP_TypeDef

CAN_TxMailBox_TypeDef

CAN_FIFOMailBox_TypeDef

CAN_FilterRegister_TypeDef

CEC_TypeDef

CRC_TypeDef

DBGMCU_TypeDef

DMA_Channel_TypeDef

DMA_TypeDef

EXTI_TypeDef

OB_TypeDef

FSMC_Bank1_TypeDef

FSMC_Bank1E_TypeDef

FSMC_Bank2_TypeDef

FSMC_Bank3_TypeDef

FSMC_Bank4_TypeDef

GPIO_TypeDef

I2C_TypeDef

IWDG_TypeDef

PWR_TypeDef

RTC_TypeDef

SDIO_TypeDef

SPI_TypeDef

TIM_TypeDef

USART_TypeDef

WWDG_TypeDef

改动部分:

1.原来的寄存器 类型定义改了,不是大事。

2.stm32f10x.h删除了原来的:

------------ Nested Vectored Interrupt Controller--------------------------//嵌套向量中断控制器

NVIC_TypeDef

SCB_TypeDef

-------------------- SystemTick -----------------------//系统时钟

SysTick_TypeDef

3.新增加了:

ETH_TypeDef

4.内容上,增加了个别寄存器:

AFIO_TypeDef

5.根据stm32不同类型的芯片,stm32f10x.h对以下进行了扩展性设置:

RCC_TypeDef

CAN_TypeDef

DAC_TypeDef

FLASH_TypeDef

6.新增加了类型定义:

/**

* @brief STM32F10x Interrupt Number Definition, according to the selected device

* in @ref Library_configuration_section

*/

IRQn_Type

/*!< 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

【略】Peripheral_memory_map 外设到内存的映射部分

【略】Peripheral declaration 外设声明
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: