第一部分:Configuration of the Cortex-M0 Processor and Core Peripherals
第二部分:中断号列表。
第三部分:包含其他头文件
#include "core_cm0.h" /* Cortex-M0 processor and core peripherals */
#include "system_stm32f0xx.h" /* STM32F0xx System Header */
#include <stdint.h>
第四部分:所有外设结构体定义,Peripheral_registers_structures
第五部分:外设在内存中的地址映射,定义每个外设的基地址,没有定义每个外设的各个寄存器的地址,因为在外设结构体定义中包含了外设内各个寄存器相对于基地址的偏移关系,所以定义了基地址+结构体就能找到每个外设的每个寄存器的地址了
第六部分:把外设基地址转换成外设结构体对象指针
第七部分:定义所有外设寄存器的各个bit
第八部分:定义一些判断宏,IS_ADC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == ADC1)
第九部分:定义一些方便移植用的宏定义的别名