Skip to content

Commit 7b25bf9

Browse files
committed
Fixed wrong usage of write-only BSRR and BRR GPIO registers
1 parent 4621bad commit 7b25bf9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stm32/aioc-fw/Src/ptt.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ static inline void PTT_Control(uint8_t pttMask)
1919
__disable_irq();
2020

2121
if (pttMask & PTT_MASK_PTT1) {
22-
PTT_GPIO->BSRR |= PTT_PIN_PTT1;
22+
PTT_GPIO->BSRR = PTT_PIN_PTT1;
2323
LED_SET(1, 1);
2424
} else {
25-
PTT_GPIO->BRR |= PTT_PIN_PTT1;
25+
PTT_GPIO->BRR = PTT_PIN_PTT1;
2626
LED_SET(1, 0);
2727
}
2828

2929
#if AIOC_ENABLE_PTT2
3030
if (pttMask & PTT_MASK_PTT2) {
31-
PTT_GPIO->BSRR |= PTT_PIN_PTT2;
31+
PTT_GPIO->BSRR = PTT_PIN_PTT2;
3232
LED_SET(0, 1);
3333
} else {
34-
PTT_GPIO->BRR |= PTT_PIN_PTT2;
34+
PTT_GPIO->BRR = PTT_PIN_PTT2;
3535
LED_SET(0, 0);
3636
}
3737
#endif

0 commit comments

Comments
 (0)