From d54bce9c10d502d54f7217f63ed7743b000fbf12 Mon Sep 17 00:00:00 2001 From: Logan G Date: Fri, 5 Jan 2024 04:18:32 -0700 Subject: [PATCH] Init the GPIO struct --- User/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/User/main.c b/User/main.c index 69bd363..6a6cde5 100644 --- a/User/main.c +++ b/User/main.c @@ -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;