STM32固件库

来源:互联网 发布:重做系统数据恢复 编辑:程序博客网 时间:2024/05/29 13:35

这里写图片描述

ST中文件的包含关系:

a.main.c 中包含

#include “stm32f0xx.h” //stm32f10x.h 包含stm32中的寄存器地址和结构体类型定义

b.stm32f0xx.h中包含

#include “core_cm0.h” //
#include “system_stm32f0xx.h” //ST公司提供,设置系统时钟和总线时钟
#include <\stdint.h>
#ifdef USE_STDPERIPH_DRIVER //编译器中添加
#include “stm32f0xx_conf.h”
#endif

c.stm32f0xx_conf.h中包含外设驱动头文件

#include “stm32f0xx_cec.h”
#include “stm32f0xx_crc.h”

d.system_stm32f0xx.c中包含 (system_stm32f0xx.h 在实现系统时钟时要用到PLL,这就需要操作寄存器,寄存器都是以存储器方式来访问的,所以要包含stm32f0xx.h)

#include “stm32f0xx.h”

e. core_cm0.h中包含stdint.h

#include <\stdint.h> //ANSI C文件,独立于处理器之外,位于MDK的安装目录下

这里写图片描述

0 0
原创粉丝点击