怎么让引脚输出高电平?

[复制链接]
363|0
 楼主| 电子学长 发表于 2019-11-20 19:32 | 显示全部楼层 |阅读模式
void DIANJI_GPIO_Config(void)
{               

                GPIO_InitTypeDef GPIO_InitStructure;

        
                RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOE, ENABLE);
                           
                                                                                                           
                GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;


                GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   


                GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;


                GPIO_Init(GPIOF, &GPIO_InitStructure);        
               
                                                                                                           
                GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;


                GPIO_Init(GPIOE, &GPIO_InitStructure);
               
                                                                                                                  
                GPIO_SetBits(GPIOE, GPIO_Pin_12|GPIO_Pin_14);         
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

424

主题

447

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部