HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
TMC9660CommInterface Class Referenceabstract

SPI status codes as per TMC9660 Parameter Mode. More...

#include <TMC9660CommInterface.hpp>

Inheritance diagram for TMC9660CommInterface:

Public Member Functions

virtual ~TMC9660CommInterface () noexcept=default
 
virtual CommMode mode () const noexcept=0
 Return underlying communication mode.
 
virtual bool transfer (const TMCLFrame &tx, TMCLReply &reply, uint8_t address) noexcept=0
 Perform a full duplex TMCL transfer.
 

Detailed Description

SPI status codes as per TMC9660 Parameter Mode.

Table 4: SPI status codes:

  • 0xFF: OK (operation successful)
  • 0x00: CHECKSUM_ERROR
  • 0x0C: FIRST_CMD (initial response after initialization)
  • 0xF0: NOT_READY (system busy, resend datagram)

Abstract communication interface for sending/receiving TMCL datagrams.

Defines the common API for higher-level code to send and receive 64-bit TMCL frames (via SPI) or 72-bit (via UART) without knowledge of the underlying transport.

Constructor & Destructor Documentation

◆ ~TMC9660CommInterface()

virtual TMC9660CommInterface::~TMC9660CommInterface ( )
virtualdefaultnoexcept

Member Function Documentation

◆ mode()

virtual CommMode TMC9660CommInterface::mode ( ) const
pure virtualnoexcept

Return underlying communication mode.

Implemented in SPITMC9660CommInterface, and UARTTMC9660CommInterface.

◆ transfer()

virtual bool TMC9660CommInterface::transfer ( const TMCLFrame tx,
TMCLReply reply,
uint8_t  address 
)
pure virtualnoexcept

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.

Implemented in UARTTMC9660CommInterface, and SPITMC9660CommInterface.


The documentation for this class was generated from the following file: