From d12914a2dff91472b4e86a62b201f398ddc3e137 Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Wed, 24 Jan 2024 21:21:32 +0100 Subject: [PATCH] Minor adjustments --- include/sta/devices/stm32/mcu/STM32F411xE.hpp | 5 ----- src/devices/stm32/gpio_pin.cpp | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/sta/devices/stm32/mcu/STM32F411xE.hpp b/include/sta/devices/stm32/mcu/STM32F411xE.hpp index 56608f5..6c15a39 100644 --- a/include/sta/devices/stm32/mcu/STM32F411xE.hpp +++ b/include/sta/devices/stm32/mcu/STM32F411xE.hpp @@ -11,11 +11,6 @@ * @brief Configuration for STM32F411xE family. */ -#ifndef STM32F411xE -# error "MCU config incompatible" -#endif // !STM32F411xE - - #include // uart setup diff --git a/src/devices/stm32/gpio_pin.cpp b/src/devices/stm32/gpio_pin.cpp index 416d3ab..a16ced1 100644 --- a/src/devices/stm32/gpio_pin.cpp +++ b/src/devices/stm32/gpio_pin.cpp @@ -49,8 +49,8 @@ namespace sta if (pin & ioPos) { // Check input mode - uint32_t mode = (gpioPin.getPort()->MODER >> (2U * i)) & GPIO_MODE; - if (mode != MODE_INPUT) + uint32_t mode = 3;//(gpioPin.getPort()->ODR >> (2U * i)) & IS_GPIO_MODE; + if (mode != GPIO_MODE_INPUT) { return false; }