77 GPIO_InitTypeDef gpio = {0};
82 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
84 gpio.GPIO_Pin = GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
85 gpio.GPIO_Mode = GPIO_Mode_Out_PP;
86 gpio.GPIO_Speed = GPIO_Speed_30MHz;
87 GPIO_Init(GPIOC, &gpio);
89 GPIO_ResetBits(GPIOC, GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7);
92 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, ENABLE);
93 gpio.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_3;
94 gpio.GPIO_Mode = GPIO_Mode_Out_PP;
95 gpio.GPIO_Speed = GPIO_Speed_30MHz;
96 GPIO_Init(GPIOD, &gpio);
97 GPIO_ResetBits(GPIOD, GPIO_Pin_0 | GPIO_Pin_2 | GPIO_Pin_3);
104 if (level != Bit_SET && level != Bit_RESET) {
107 if (level != Bit_RESET) {