HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
|
UART implementation of TMC9660CommInterface. More...
#include <TMC9660CommInterface.hpp>
Public Member Functions | |
CommMode | mode () const noexcept override |
Return underlying communication mode. | |
virtual bool | sendUartDatagram (const std::array< uint8_t, 9 > &data) noexcept=0 |
Send raw 9-byte UART TMCL datagram. | |
virtual bool | receiveUartDatagram (std::array< uint8_t, 9 > &data) noexcept=0 |
Receive raw 9-byte UART TMCL datagram. | |
bool | transfer (const TMCLFrame &tx, TMCLReply &reply, uint8_t address) noexcept override |
Perform a full duplex TMCL transfer. | |
![]() | |
virtual | ~TMC9660CommInterface () noexcept=default |
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.
|
inlineoverridevirtualnoexcept |
Return underlying communication mode.
Implements TMC9660CommInterface.
|
pure virtualnoexcept |
Receive raw 9-byte UART TMCL datagram.
data | Array to store 9 received bytes. |
|
pure virtualnoexcept |
Send raw 9-byte UART TMCL datagram.
data | Array of 9 bytes including sync, fields, and checksum. |
|
inlineoverridevirtualnoexcept |
Perform a full duplex TMCL transfer.
Implementations encode tx
according to the active mode (SPI or UART), transmit it and decode the reply into reply
. The address
parameter is only used for UART transfers and ignored for SPI.
Implements TMC9660CommInterface.