学前班
最后登录1970-1-1
在线时间 小时
注册时间2019-6-10
|
void LED_GPIO_Config(void)
{
GPIO_InitTypeDef *GPIO_InitStructure;//GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd ( LED1_GPIO_CLK|
LED2_GPIO_CLK|
LED3_GPIO_CLK, ENABLE);
GPIO_InitStructure->GPIO_Pin = LED1_PIN; //GPIO_InitStructure.GPIO_Pin = LED1_PIN;
GPIO_InitStructure->GPIO_Mode = GPIO_Mode_OUT; //GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure->GPIO_OType = GPIO_OType_PP;//GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure->GPIO_PuPd = GPIO_PuPd_UP;//GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_InitStructure->GPIO_Speed = GPIO_Speed_2MHz; //GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(LED1_GPIO_PORT, GPIO_InitStructure); //GPIO_Init(LED1_GPIO_PORT, &GPIO_InitStructure);
GPIO_InitStructure->GPIO_Pin = LED2_PIN; //GPIO_InitStructure.GPIO_Pin = LED2_PIN;
GPIO_Init(LED2_GPIO_PORT, GPIO_InitStructure); //GPIO_Init(LED2_GPIO_PORT, &GPIO_InitStructure);
GPIO_InitStructure->GPIO_Pin = LED3_PIN; //GPIO_InitStructure.GPIO_Pin = LED3_PIN;
GPIO_Init(LED3_GPIO_PORT, GPIO_InitStructure); //GPIO_Init(LED3_GPIO_PORT, &GPIO_InitStructure);
LED_RGBOFF;
请教各位大佬,为什么修改成左边的形式之后就不能实现功能了呢?
|
|