From c50058d6a2d10e4b63fce8bfa9116b503e6dcbe5 Mon Sep 17 00:00:00 2001 From: Stephen Dwyer Date: Fri, 29 Mar 2013 16:17:01 -0600 Subject: [PATCH] [stm32][ms2100] the reset/set gpio state for the ms2100 reset functionality was inverted, hopefully fixes Issue #384 --- sw/airborne/arch/stm32/peripherals/ms2100_arch.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sw/airborne/arch/stm32/peripherals/ms2100_arch.h b/sw/airborne/arch/stm32/peripherals/ms2100_arch.h index 701158e761..9e10edde6f 100644 --- a/sw/airborne/arch/stm32/peripherals/ms2100_arch.h +++ b/sw/airborne/arch/stm32/peripherals/ms2100_arch.h @@ -31,12 +31,20 @@ #include #include "mcu_periph/spi.h" +/** + * Here Reset indicates the Ms2100 is in normal state, i.e. + * the reset line is driven low (i.e. the GPIO is "reset") + */ static inline void Ms2100Reset(void) { - GPIOC_BSRR = GPIO13; + GPIOC_BRR = GPIO13; } +/** + * Here Set indicates the Ms2100 is in reset state, i.e. + * the reset line is driven high (i.e. the GPIO is "set") + */ static inline void Ms2100Set(void) { - GPIOC_BRR = GPIO13; + GPIOC_BSRR = GPIO13; } #define Ms2100HasEOC() (gpio_get(GPIOB, GPIO5) != 0)