初级会员

- 积分
- 190
- 金钱
- 190
- 注册时间
- 2016-3-20
- 在线时间
- 22 小时
|
5金钱
本帖最后由 xiakemoon 于 2016-6-23 17:32 编辑
我把按键程序里的GPIO_InitTypeDef GPIO_InitStructure改为GPIO_InitTypeDef* GPIO_InitStructure,代码如下:
GPIO_InitTypeDef* GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOE, ENABLE);
GPIO_InitStructure->GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4;
GPIO_InitStructure->GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure->GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure->GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOE, GPIO_InitStructure);
编译通过了,可是无法正常工作,KEY连接的端口一开始都是0,请问大家这是哪里出错了
|
|