|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Chip IO / mode pins / IOIN helpers. More...
#include <tmc51x0.hpp>
Public Member Functions | |
| Io (TMC51x0 &driver) noexcept | |
| Result< void > | SetOperatingMode (ChipCommMode mode) noexcept |
| Set the chip operating mode via SPI_MODE and SD_MODE pins. | |
| Result< ChipCommMode > | GetOperatingMode () const noexcept |
| Read the current mode-pin state (SPI_MODE/SD_MODE) | |
| Result< InputStatus > | ReadInputStatus () noexcept |
| Read GPIO input pins (parsed) from IOIN. | |
| Result< uint8_t > | ReadIcVersion () noexcept |
| Read IC version from IOIN. | |
| Result< uint32_t > | ReadGpioPins () noexcept |
| Read GPIO input pins (raw) from IOIN. | |
| Result< void > | SetSdoCfg0Polarity (bool polarity) noexcept |
| Set SDO_CFG0 pin polarity (UART/Single Wire mode) | |
Private Attributes | |
| TMC51x0 & | driver_ |
Chip IO / mode pins / IOIN helpers.
Groups "pin-state / IOIN / mode pins" operations so they don't get mixed into status monitoring or communication addressing.
|
inlineexplicitnoexcept |
|
noexcept |
Read the current mode-pin state (SPI_MODE/SD_MODE)
This method reads the current state of SPI_MODE (pin 22) and SD_MODE (pin 21) pins if they are connected to GPIO inputs/outputs.
|
noexcept |
Read GPIO input pins (raw) from IOIN.
|
noexcept |
Read IC version from IOIN.
|
noexcept |
Read GPIO input pins (parsed) from IOIN.
|
noexcept |
Set the chip operating mode via SPI_MODE and SD_MODE pins.
| mode | Operating mode (SPI_INTERNAL_RAMP, SPI_EXTERNAL_STEPDIR, UART_INTERNAL_RAMP, STANDALONE_EXTERNAL_STEPDIR) |
This method controls the SPI_MODE (pin 22) and SD_MODE (pin 21) pins if they are connected to GPIO outputs. These pins determine both the communication interface (SPI/UART/Standalone) and the motion control method (Internal ramp generator vs External step/dir).
CRITICAL WARNINGS:
|
noexcept |
Set SDO_CFG0 pin polarity (UART/Single Wire mode)
| polarity | Output pin polarity (false=normal/active high, true=inverted/active low) |
|
private |