
这个不用解释了吧
stm32f10x.h
这个是头文件,它包含了stm32的一些常用宏,寄存器结构体的定义,高版本的库还放着中断向量表。
stm32f10x_rcc.c
这个文件里的固件函数包含了一些对复位、时钟的控制的函数
stm32f10x_gpio.c这个文件里的固件函数包含了对GPIO的 *** 作函数
stm32_eval.c
这个是st公司为其制作的评估板写的程序
system_stm32f10x.c主要包含了对系统时钟设置,一般是对倍频时钟的设置
三、GPIO_InitTypeDef
GPIO_InitStructure
ErrorStatus
HSEStartUpStatus
u8
count=0
四、void
Delay(vu32
nCount)
void
Turn_On_LED(u8
LED_NUM)
希望您能帮助我,我会给您高分的。回答:
1、因为引脚本来就是16个的啊,从pin0~pin15,GPIOA口有16个脚,GPIOB也有16个,GPIOC也有16个,是这样区分的,它是相对于一组io口的细分,ALL来代替的是选中了这一组io
2、不可以,呵呵你要选择到底是GPIOA还是GPIOB还是...C还是...D等等的GPIO_Pin_0
3、GPIO_InitTypeDef、ErrorStatus是两个结构体,u8是定义的unsigned
char你可以通过keil的go
to
definition选项找到它们的定义,这个是标准C的定义
嗯,是的C语言基础不太好,以前学单片机主要是用汇编。
回答:
因为,stm32f10x.h中包含了一系列的标准库头文件,其中就包括了stm32f10x_gpio.h,但是,一定要确保宏配制正确!查看一下stm32f10x.h源代码就清楚了
应当包含类似typedef.h之类的头文件或者在前面加:
typedef
signed
char
int8
//!<
signed
8
bit
integer
typedef
unsigned
char
uint8
//!<
unsigned
8
bit
integer
typedef
signed
short
int16
//!<
signed
16
bit
integer
typedef
unsigned
short
uint16
//!<
unsigned
16
bit
integer
typedef
signed
long
int32
//!<
signed
32
bit
integer
typedef
unsigned
long
uint32
//!<
unsigned
32
bit
integer
typedef
unsigned
char
bool
//!<
boolean
data
type
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)