From 786cfc12baff5c73c2b09097c6cbeaa125af6e58 Mon Sep 17 00:00:00 2001 From: Simon Kueppers Date: Fri, 24 Feb 2023 16:10:46 +0100 Subject: [PATCH] Fixed wrong usage of write-only BSRR and BRR GPIO registers --- stm32/aioc-fw/Src/ptt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stm32/aioc-fw/Src/ptt.h b/stm32/aioc-fw/Src/ptt.h index aa65168..363d848 100644 --- a/stm32/aioc-fw/Src/ptt.h +++ b/stm32/aioc-fw/Src/ptt.h @@ -19,19 +19,19 @@ static inline void PTT_Control(uint8_t pttMask) __disable_irq(); if (pttMask & PTT_MASK_PTT1) { - PTT_GPIO->BSRR |= PTT_PIN_PTT1; + PTT_GPIO->BSRR = PTT_PIN_PTT1; LED_SET(1, 1); } else { - PTT_GPIO->BRR |= PTT_PIN_PTT1; + PTT_GPIO->BRR = PTT_PIN_PTT1; LED_SET(1, 0); } #if AIOC_ENABLE_PTT2 if (pttMask & PTT_MASK_PTT2) { - PTT_GPIO->BSRR |= PTT_PIN_PTT2; + PTT_GPIO->BSRR = PTT_PIN_PTT2; LED_SET(0, 1); } else { - PTT_GPIO->BRR |= PTT_PIN_PTT2; + PTT_GPIO->BRR = PTT_PIN_PTT2; LED_SET(0, 0); } #endif