Init the GPIO struct

This commit is contained in:
Logan G 2024-01-05 04:18:32 -07:00
parent cffa7de486
commit d54bce9c10
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -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;