打印

怎么让引脚输出高电平?

[复制链接]
201|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

粉丝