初级会员

- 积分
- 79
- 金钱
- 79
- 注册时间
- 2018-4-29
- 在线时间
- 21 小时
|

楼主 |
发表于 2018-7-10 14:04:17
|
显示全部楼层
[mw_shl_code=c,true]#include "stm32f10x.h"
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, ENABLE); //ê1ÄüPE¶Ë¿úê±Öó
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; //PE0 ¶Ë¿úÅäÖÃ
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //íÆíìêä3ö
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //IO¿úËù¶èÎa50MHz
GPIO_Init(GPIOE, &GPIO_InitStructure); //3õê¼»ˉGPIOE.0
while(1)
{
GPIO_ResetBits(GPIOE, GPIO_Pin_0);
}
}
[/mw_shl_code]
我这个样子写的main.c,发现PE0还是输出高电平,请问这个是怎么回事呢?
|
|