|
| | UartCommInterface (bool rst_active_level, bool drv_en_active_level, bool wake_active_level, bool faultn_active_level) noexcept |
| | Construct UART communication interface with pin active level configuration.
|
| |
| CommMode | mode () const noexcept |
| | Get communication mode (always UART for this interface)
|
| |
| bool | uartSendTMCL (const std::array< uint8_t, 9 > &data) noexcept |
| | Send raw 9-byte UART TMCL datagram for parameter mode communication.
|
| |
| bool | uartReceiveTMCL (std::array< uint8_t, 9 > &data) noexcept |
| | Receive raw 9-byte UART TMCL datagram for parameter mode communication.
|
| |
| bool | uartTransferBootloader (const std::array< uint8_t, 8 > &tx, std::array< uint8_t, 8 > &rx) noexcept |
| | Transfer 8-byte UART bootloader datagram (send and receive).
|
| |
| bool | gpioSet (TMC9660CtrlPin pin, GpioSignal signal) noexcept |
| | Set GPIO pin signal state for UART interface.
|
| |
| bool | gpioRead (TMC9660CtrlPin pin, GpioSignal &signal) noexcept |
| | Read GPIO pin signal state for UART interface.
|
| |
| bool | transferTMCL (const TMCLFrame &tx, TMCLReply &reply, uint8_t address, TMCLReply *first_reply, const TMCLFrame *second_command) noexcept |
| |
| | CommInterface (bool rst_active_level, bool drv_en_active_level, bool wake_active_level, bool faultn_active_level) noexcept |
| | Construct communication interface with pin active level configuration.
|
| |
| CommMode | mode () const noexcept |
| | Get the underlying communication mode used by this interface.
|
| |
| bool | transferTMCL (const TMCLFrame &tx, TMCLReply &reply, uint8_t address, TMCLReply *first_reply=nullptr, const TMCLFrame *second_command=nullptr) noexcept |
| | Perform a full duplex TMCL transfer for parameter mode communication.
|
| |
| bool | gpioSet (TMC9660CtrlPin pin, GpioSignal signal) noexcept |
| | Set GPIO pin signal state (output control).
|
| |
| bool | gpioRead (TMC9660CtrlPin pin, GpioSignal &signal) noexcept |
| | Read GPIO pin signal state (input state).
|
| |
| bool | signalToGpioLevel (TMC9660CtrlPin pin, GpioSignal signal) const noexcept |
| | Convert signal state to physical GPIO level.
|
| |
| GpioSignal | gpioLevelToSignal (TMC9660CtrlPin pin, bool gpio_level) const noexcept |
| | Convert physical GPIO level to signal state.
|
| |
| bool | gpioSetActive (TMC9660CtrlPin pin) noexcept |
| | Set GPIO pin to active state (convenience method).
|
| |
| bool | gpioSetInactive (TMC9660CtrlPin pin) noexcept |
| | Set GPIO pin to inactive state (convenience method).
|
| |
| bool | set_pin_active_level (TMC9660CtrlPin pin, bool active_level) noexcept |
| | Configure the active level for a specific pin.
|
| |
| void | setSpiRetryMaxCount (uint8_t max_retries) noexcept |
| | Set maximum number of retries for SPI_STATUS_NOT_READY responses.
|
| |
| uint8_t | getSpiRetryMaxCount () const noexcept |
| | Get current maximum retry count for SPI_STATUS_NOT_READY.
|
| |
| void | setSpiRetryInterval (uint32_t interval_us) noexcept |
| | Set delay interval between retry attempts for SPI_STATUS_NOT_READY.
|
| |
| uint32_t | getSpiRetryInterval () const noexcept |
| | Get current retry interval for SPI_STATUS_NOT_READY.
|
| |
| void | delayMs (uint32_t ms) noexcept |
| | Delay execution for specified milliseconds.
|
| |
| void | delayUs (uint32_t us) noexcept |
| | Delay execution for specified microseconds.
|
| |
| void | logDebug (int level, const char *tag, const char *format,...) noexcept |
| | Public debug logging wrapper for external classes.
|
| |
CRTP-based UART implementation of TMC9660CommInterface.
Uses UART_TXD and UART_RXD signals; supports external transceivers via UART_TXEN. Frames consist of 9 bytes: sync+address, command, type, motor, 4-byte data, checksum. LSB-first transmission; checksum is 8-bit sum of first 8 bytes.
This template class uses CRTP for compile-time polymorphism, providing zero runtime overhead.
Example usage:
public:
bool uartSendTMCL(...) { ... }
bool uartReceiveTMCL(...) { ... }
bool uartTransferBootloader(...) { ... }
};
SPI status codes as per TMC9660 Parameter Mode.
Definition tmc9660_comm_interface.hpp:514
bool gpioRead(TMC9660CtrlPin pin, GpioSignal &signal) noexcept
Read GPIO pin signal state (input state).
Definition tmc9660_comm_interface.hpp:588
void delayUs(uint32_t us) noexcept
Delay execution for specified microseconds.
Definition tmc9660_comm_interface.hpp:760
void debugLog(int level, const char *tag, const char *format, va_list args) noexcept
Debug logging function for detailed debugging information.
Definition tmc9660_comm_interface.hpp:737
void delayMs(uint32_t ms) noexcept
Delay execution for specified milliseconds.
Definition tmc9660_comm_interface.hpp:748
CommMode mode() const noexcept
Get the underlying communication mode used by this interface.
Definition tmc9660_comm_interface.hpp:536
bool gpioSet(TMC9660CtrlPin pin, GpioSignal signal) noexcept
Set GPIO pin signal state (output control).
Definition tmc9660_comm_interface.hpp:573
CRTP-based UART implementation of TMC9660CommInterface.
Definition tmc9660_comm_interface.hpp:1066
CommMode
Supported physical communication modes for TMC9660.
Definition tmc9660_comm_interface.hpp:113
- Template Parameters
-
| Derived | The derived class type (CRTP pattern) |