diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-05-27 23:06:57 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-05-27 23:06:57 +0300 |
commit | abb62a3aee28addfce053d6f0d9c82d85160c595 (patch) | |
tree | e3cfb1698c0262ec52a2b9c9a2ed3015dfe7e72b /src/Duet3_V06 | |
parent | 4082db3e809db86a06cb9d807f21cf1d377bc948 (diff) |
Various
Bug fix: fix filament needed array overflow when then GCode file
contains a filament used comment line with too many values
Adjust the number of stepper drivers on Duet 2 if a 12864 display is
configured
Changed step pulse code to not use paralell write because those are not
available on the 5LC board (or on LPC-based boards)
Changed 12864 LCD pin allocations for Duet NG
Removed calls to SafeStrtoul from BinaryParser and IoPorts
Diffstat (limited to 'src/Duet3_V06')
-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 } } |