From 9e4aaeabd539db388be96c9eaf84627b53f4c8ac Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Mon, 30 Dec 2024 11:49:48 +0100 Subject: [PATCH] GPIO alternative function registers are 32bit each, not 64bit --- src/gpio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gpio.h b/src/gpio.h index b632b1b..dbe3e33 100644 --- a/src/gpio.h +++ b/src/gpio.h @@ -13,8 +13,8 @@ struct gpio { volatile uint32_t ODR; // Port output data register volatile uint32_t BSRR; // Port bit set/reset register volatile uint32_t LCKR; // Port configuration lock register - volatile uint32_t AFRL[2]; // Alternative function low register - volatile uint32_t AFRH[2]; // Alternative function high register + volatile uint32_t AFRL; // Alternative function low register + volatile uint32_t AFRH; // Alternative function high register }; #define GPIO_BASE_ADDR (0x40020000U)