From 6d0679b9e9cef7d7bcb71d6040c41f88d63e7234 Mon Sep 17 00:00:00 2001 From: FredericG Date: Sat, 5 Mar 2011 12:53:52 +0000 Subject: [PATCH] Small fix to PIOS_DEBUG_PinValue8Bit(), was also influencing other IO pins git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2975 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/PiOS/STM32F10x/pios_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/PiOS/STM32F10x/pios_debug.c b/flight/PiOS/STM32F10x/pios_debug.c index 63539c8d1..ca4f67dc5 100644 --- a/flight/PiOS/STM32F10x/pios_debug.c +++ b/flight/PiOS/STM32F10x/pios_debug.c @@ -104,8 +104,8 @@ void PIOS_DEBUG_PinLow(uint8_t Pin) void PIOS_DEBUG_PinValue8Bit(uint8_t value) { #ifdef PIOS_ENABLE_DEBUG_PINS - uint32_t bsrr_l = ((~(value & 0x0F)<<(16+6))) | ((value & 0x0F)<<6); - uint32_t bsrr_h = ((~(value & 0xF0)<<(16+6-4))) | ((value & 0xF0)<<(6-4)); + uint32_t bsrr_l = ( ((~value)&0x0F)<<(16+6) ) | ((value & 0x0F)<<6); + uint32_t bsrr_h = ( ((~value)&0xF0)<<(16+6-4) ) | ((value & 0xF0)<<(6-4)); PIOS_IRQ_Disable(); PIOS_SERVO_GPIO_PORT_1TO4->BSRR = bsrr_l; PIOS_SERVO_GPIO_PORT_5TO8->BSRR = bsrr_h;