金牌会员
 
- 积分
- 2114
- 金钱
- 2114
- 注册时间
- 2015-1-29
- 在线时间
- 123 小时
|

楼主 |
发表于 2021-11-8 12:18:09
|
显示全部楼层
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOF, ENABLE);//ê1?üGPIOFê±?ó
//GPIOF9,F103?ê??ˉéè??
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;//??í¨ê?3??£ê?
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;//í?íìê?3?
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;//100MHz
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//é?à-
GPIO_Init(GPIOF, &GPIO_InitStructure);//3?ê??ˉ
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE);//ê1?üGPIOFê±?ó
//GPIOF9,F103?ê??ˉéè??
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;//??í¨ê?3??£ê?
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;//í?íìê?3?
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;//100MHz
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//é?à-
GPIO_Init(GPIOG, &GPIO_InitStructure);//3?ê??ˉ
//GPIO_SetBits(GPIOF,GPIO_Pin_9 | GPIO_Pin_10);//GPIOF9,F10éè????£?μ??e
}.
按照楼上说的,我已作了处理,怎么样能使PF=SHU G=SHU2?
|
|