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

[复制链接]
 楼主| 追光少年 发表于 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

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

379

主题

379

帖子

0

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