diff options
Diffstat (limited to 'src/Duet3_V06/Pins_Duet3_V06.h')
-rw-r--r-- | src/Duet3_V06/Pins_Duet3_V06.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/Duet3_V06/Pins_Duet3_V06.h b/src/Duet3_V06/Pins_Duet3_V06.h index 12dffad1..07e5e8cf 100644 --- a/src/Duet3_V06/Pins_Duet3_V06.h +++ b/src/Duet3_V06/Pins_Duet3_V06.h @@ -309,20 +309,16 @@ namespace StepPins : 0; } - // Set the specified step pins high - // This needs to be as fast as possible, so we do a parallel write to the port(s). - // We rely on only those port bits that are step pins being set in the PIO_OWSR register of each port - static inline void StepDriversHigh(uint32_t driverMap) noexcept + // Set the specified step pins high. This needs to be fast. + static inline __attribute__((always_inline)) void StepDriversHigh(uint32_t driverMap) noexcept { - PIOC->PIO_ODSR = driverMap; // on Duet 3 all step pins are on port C + PIOC->PIO_SODR = driverMap; // on Duet 3 all step pins are on port C } - // Set all step pins low - // This needs to be as fast as possible, so we do a parallel write to the port(s). - // We rely on only those port bits that are step pins being set in the PIO_OWSR register of each port - static inline void StepDriversLow() noexcept + // Set the specified step pins low. This needs to be fast. + static inline __attribute__((always_inline)) void StepDriversLow(uint32_t driverMap) noexcept { - PIOC->PIO_ODSR = 0; // on Duet 3 all step pins are on port C + PIOC->PIO_CODR = driverMap; // on Duet 3 all step pins are on port C } } |