|
| | Esp32Tmc9660SpiBus (spi_host_device_t host, gpio_num_t mosi_pin, gpio_num_t miso_pin, gpio_num_t sclk_pin, gpio_num_t cs_pin, gpio_num_t rst_pin, gpio_num_t drv_en_pin, gpio_num_t faultn_pin, gpio_num_t wake_pin, uint32_t clock_speed_hz=10000000, uint8_t mode=0) noexcept |
| | Construct ESP32 SPI communication interface.
|
| |
| | ~Esp32Tmc9660SpiBus () noexcept |
| | Destructor - cleans up SPI resources.
|
| |
| bool | initialize () noexcept |
| | Initialize the SPI interface.
|
| |
| bool | deinitialize () noexcept |
| | Deinitialize the SPI interface.
|
| |
| bool | spiTransferTMCL (std::array< uint8_t, 8 > &tx, std::array< uint8_t, 8 > &rx) noexcept |
| | Perform SPI transfer for TMC9660 TMCL parameter mode communication.
|
| |
| bool | spiTransferBootloader (std::array< uint8_t, 5 > &tx, std::array< uint8_t, 5 > &rx) noexcept |
| |
| CommMode | mode () const noexcept |
| | Get communication mode.
|
| |
| bool | gpioSet (TMC9660CtrlPin pin, GpioSignal signal) noexcept |
| | Set GPIO pin signal state for TMC9660 control pins.
|
| |
| bool | gpioRead (TMC9660CtrlPin pin, GpioSignal &signal) noexcept |
| | Read GPIO pin level for TMC9660 status pins.
|
| |
| void | debugLog (int level, const char *tag, const char *format, va_list args) noexcept |
| | Debug logging function that routes logs through ESP-IDF logging system.
|
| |
| void | delayMs (uint32_t ms) noexcept |
| |
| void | delayUs (uint32_t us) noexcept |
| |
| | SpiCommInterface (bool rst_active_level, bool drv_en_active_level, bool wake_active_level, bool faultn_active_level) noexcept |
| | Construct SPI communication interface with pin active level configuration.
|
| |
| CommMode | mode () const noexcept |
| | Get communication mode (always SPI for this interface)
|
| |
| bool | spiTransferTMCL (std::array< uint8_t, 8 > &tx, std::array< uint8_t, 8 > &rx) noexcept |
| | Low-level SPI transfer for TMCL parameter mode communication.
|
| |
| bool | spiTransferBootloader (std::array< uint8_t, 5 > &tx, std::array< uint8_t, 5 > &rx) noexcept |
| | Low-level SPI transfer for bootloader communication.
|
| |
| bool | gpioSet (TMC9660CtrlPin pin, GpioSignal signal) noexcept |
| | Set GPIO pin signal state for SPI interface.
|
| |
| bool | gpioRead (TMC9660CtrlPin pin, GpioSignal &signal) noexcept |
| | Read GPIO pin signal state for SPI interface.
|
| |
| bool | transferTMCL (const TMCLFrame &tx, TMCLReply &reply, uint8_t, 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.
|
| |
ESP32 SPI implementation of TMC9660CommInterface.
This class provides SPI communication for the TMC9660 using ESP-IDF SPI driver. It handles the 8-byte SPI transfers required by the TMC9660 parameter mode.