打印

为什么LED初始化函数最后早关LED?

[复制链接]
299|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
追光少年|  楼主 | 2018-6-29 14:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
void LED_GPIO_Config(void)
{
        /*define a GPIO_InitTypeDef type structure*/
        GPIO_InitTypeDef GPIO_InitStructure;
        
        /*Open the fpCLK of the GPIOB,GPIOF */
        RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOF,ENABLE);
        
        /*Select the under control Pin_GPIOB_0*/
        GPIO_InitStructure.GPIO_Pin   = GPIO_Pin_0;
        
        /*Setting the pin mode as Push pull output */
        GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_Out_PP;
        
        /*Setting the pin speed as 50MHz*/
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        
        /*Call Library Function to initialize the GPIOB0*/
        GPIO_Init(GPIOB, &GPIO_InitStructure);
        
        /*Close all LED lights*/
        GPIO_SetBits(GPIOB, GPIO_Pin_0);



最后的        /*Close all LED lights*/
        GPIO_SetBits(GPIOB, GPIO_Pin_0);  起什么作用》??

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

379

主题

379

帖子

0

粉丝