kopia lustrzana https://github.com/skuep/AIOC
Fixed wrong usage of write-only BSRR and BRR GPIO registers
rodzic
45ef1e3e20
commit
786cfc12ba
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue