GPIO初始化函数进行配置。
针对端口的功能配置好以下的参数为合适的值:完成初始化既可以
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOFENABLE);
//Init RCC clock; LED for GPIOF
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9|GPIO_Pin_10;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType
= GPIO_OType_PP; //Push_Pull(PP)
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; //yuanlitu
GPIO_InitStructure.GPIO_Speed
= GPIO_Speed_100MHz;