1.sys.h 是我们引入所有固件库本身头文件的入口。
它include 了"stm32f10x.h",
stm32f10x.h又引入了core_com3.h
0478 #include "core_cm3.h"
stm32f10x.h同时也引入了stm32f10x_conf.h
0479 #include "stm32f10x_conf.h"
stm32f10x_conf.h引入了misc.h
所以所有的固件库本身的头文件都在stm32f10x.h里面引入了。
外设对应的头文件引入与否在stm32f10x_conf.h里面增删,这在我们开发指南中有详细讲解:
#ifndef __STM32F10x_CONF_H
#define __STM32F10x_CONF_H
/* Includes ------------------------------------------------------------------*/
/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
//#include "stm32f10x_adc.h"
//#include "stm32f10x_bkp.h"
//#include "stm32f10x_can.h"
//#include "stm32f10x_cec.h"
//#include "stm32f10x_crc.h"
//#include "stm32f10x_dac.h"
#include "stm32f10x_dbgmcu.h"
//#include "stm32f10x_dma.h"
//#include "stm32f10x_exti.h"
//#include "stm32f10x_flash.h"
//#include "stm32f10x_fsmc.h"
#include "stm32f10x_gpio.h"
//#include "stm32f10x_i2c.h"
//#include "stm32f10x_iwdg.h"
//#include "stm32f10x_pwr.h"
#include "stm32f10x_rcc.h"
//#include "stm32f10x_rtc.h"
//#include "stm32f10x_sdio.h"
//#include "stm32f10x_spi.h"
//#include "stm32f10x_tim.h"
#include "stm32f10x_usart.h"
//#include "stm32f10x_wwdg.h"
#include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */
2.查询头文件引入方法最简单的方法是搜索工程中头文件xxxx.h,就可以查看在哪里引入了。
|