Init the GPIO struct
This commit is contained in:
parent
cffa7de486
commit
d54bce9c10
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ void GPIO_LED_Init(void) {
|
|||
GPIO_InitTypeDef GPIO_InitStructure = {0};
|
||||
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, ENABLE);
|
||||
|
||||
GPIO_StructInit(&GPIO_InitStructure);
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
|
||||
|
|
Loading…
Reference in a new issue