Fix gpio::TogglePin on AVR
TogglePin was incorrectly using the PINx pin for toggling, causing the current pins (in addition to the requested ones) to be toggled, causing stepping havoc.pull/108/head
parent
a58450acb6
commit
1f2662518b
|
|
@ -70,7 +70,7 @@ __attribute__((always_inline)) inline Level ReadPin(const GPIO_pin portPin) {
|
|||
__attribute__((always_inline)) inline void TogglePin(const GPIO_pin portPin) {
|
||||
#ifdef __AVR__
|
||||
// Optimized path for AVR, resulting in a pin toggle
|
||||
portPin.port->PINx |= (1 << portPin.pin);
|
||||
portPin.port->PINx = (1 << portPin.pin);
|
||||
#else
|
||||
WritePin(portPin, (Level)(ReadPin(portPin) != Level::high));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue