|
HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
|
Configure automatic stop/latch behaviour for deviation, switches. More...
#include <tmc9660.hpp>
Classes | |
| struct | StopEventsConfig |
| Configuration structure for stop events auto-configuration. More... | |
Public Member Functions | |
| bool | enableDeviationStop (uint32_t max_vel_error, uint32_t max_pos_error, bool softStop=true) noexcept |
| Stop when ramp target deviates from actual > thresholds. | |
| bool | configureReferenceSwitches (uint8_t mask, bool invert_l, bool invert_r, bool invert_h, bool swap_lr) noexcept |
| Configure reference / limit-switch inputs. | |
| bool | getAndClearLatchedPosition (int32_t &pos) noexcept |
| Read and clear the latched position from a switch event. | |
| bool | configureAuto (const StopEventsConfig &config) noexcept |
| Auto-configure stop events parameters. | |
Private Member Functions | |
| StopEvents (TMC9660 &parent) noexcept | |
Private Attributes | |
| TMC9660 & | driver |
Friends | |
| class | TMC9660 |
Configure automatic stop/latch behaviour for deviation, switches.
|
inlineexplicitprivatenoexcept |
|
noexcept |
Auto-configure stop events parameters.
Configures deviation stop thresholds and reference switch settings based on high-level requirements.
| config | Stop events configuration (see StopEventsConfig) |
|
noexcept |
Configure reference / limit-switch inputs.
| mask | Bit-mask 0…7 ; see REFERENCE_SWITCH_ENABLE. |
| invert_l,R,H | invert individual polarities. |
| swap_lr | swap left/right wiring. |
Configure reference and limit switch inputs.
| mask | Bit mask of switches to enable (see REFERENCE_SWITCH_ENABLE). |
| invert_l | Invert left switch polarity. |
| invert_r | Invert right switch polarity. |
| invert_h | Invert home switch polarity. |
| swap_lr | Swap left and right wiring. |
|
noexcept |
Stop when ramp target deviates from actual > thresholds.
Stop when ramp target deviates from actual values beyond the allowed thresholds.
| max_vel_error | Maximum allowed velocity error. |
| max_pos_error | Maximum allowed position error. |
| soft_stop | Use soft stop instead of immediate stop when true. |
|
noexcept |
Read and clear the latched position from a switch event.
| [out] | pos | Latched position value. |
|
private |