|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Reference switch configuration structure. More...
#include <tmc51x0_types.hpp>
Public Member Functions | |
| ReferenceSwitchConfig ()=default | |
| Default constructor. | |
Public Attributes | |
| ReferenceSwitchActiveLevel | left_switch_active |
| ReferenceSwitchActiveLevel | right_switch_active |
| bool | left_switch_stop_enable |
| bool | right_switch_stop_enable |
| ReferenceStopMode | stop_mode |
| Stop mode (hard or soft) - only applies if stop is enabled. | |
| bool | swap_left_right {false} |
| Swap left and right switch inputs (useful for reversed wiring) | |
| ReferenceLatchMode | latch_left {ReferenceLatchMode::DISABLED} |
| Left switch latching mode (must be explicitly set) | |
| ReferenceLatchMode | latch_right {ReferenceLatchMode::DISABLED} |
| Right switch latching mode (must be explicitly set) | |
| bool | en_latch_encoder {false} |
| Latch encoder position on switch event (for encoder N-channel as third switch) | |
Reference switch configuration structure.
Configuration parameters for reference switches/endstops used for homing and limit detection. Supports both mechanical switches and encoder N-channel as a third switch option.
|
default |
Default constructor.
Initializes with safe defaults:
| bool tmc51x0::ReferenceSwitchConfig::en_latch_encoder {false} |
Latch encoder position on switch event (for encoder N-channel as third switch)
| ReferenceLatchMode tmc51x0::ReferenceSwitchConfig::latch_left {ReferenceLatchMode::DISABLED} |
Left switch latching mode (must be explicitly set)
| ReferenceLatchMode tmc51x0::ReferenceSwitchConfig::latch_right {ReferenceLatchMode::DISABLED} |
Right switch latching mode (must be explicitly set)
| ReferenceSwitchActiveLevel tmc51x0::ReferenceSwitchConfig::left_switch_active |
Left switch active level (REFL) ACTIVE_LOW = active when LOW (inverted polarity), ACTIVE_HIGH = active when HIGH (normal polarity)
| bool tmc51x0::ReferenceSwitchConfig::left_switch_stop_enable |
Enable automatic motor stop on left switch (independent of active level) true = stop motor when switch is active, false = don't stop (but can still latch/read switch state)
| ReferenceSwitchActiveLevel tmc51x0::ReferenceSwitchConfig::right_switch_active |
Right switch active level (REFR) ACTIVE_LOW = active when LOW (inverted polarity), ACTIVE_HIGH = active when HIGH (normal polarity)
| bool tmc51x0::ReferenceSwitchConfig::right_switch_stop_enable |
Enable automatic motor stop on right switch (independent of active level) true = stop motor when switch is active, false = don't stop (but can still latch/read switch state)
| ReferenceStopMode tmc51x0::ReferenceSwitchConfig::stop_mode |
Stop mode (hard or soft) - only applies if stop is enabled.
| bool tmc51x0::ReferenceSwitchConfig::swap_left_right {false} |
Swap left and right switch inputs (useful for reversed wiring)