HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
Loading...
Searching...
No Matches
Esp32SpiPinConfig Struct Reference

Complete ESP32 SPI bus and TMC51x0 pin configuration structure. More...

#include <esp32_tmc51x0_bus.hpp>

Collaboration diagram for Esp32SpiPinConfig:
[legend]

Public Member Functions

 Esp32SpiPinConfig ()=default
 Default constructor - all pins unmapped (-1)
 
 Esp32SpiPinConfig (int mosi, int miso, int sclk, int cs, int en, int dir=-1, int step=-1) noexcept
 Constructor with SPI pins and basic TMC51x0 pins.
 
 Esp32SpiPinConfig (int mosi, int miso, int sclk, int cs, const tmc51x0::TMC51x0PinConfig &tmc_pins) noexcept
 Constructor with SPI pins and full TMC5160 pin config.
 

Public Attributes

int spi_mosi {-1}
 SPI MOSI pin (Master Out, Slave In)
 
int spi_miso {-1}
 SPI MISO pin (Master In, Slave Out)
 
int spi_sclk {-1}
 SPI clock pin (SCLK)
 
int spi_cs {-1}
 SPI chip select pin (CS)
 
tmc51x0::TMC51x0PinConfig tmc51x0_pins
 TMC51x0 control pin configuration.
 

Detailed Description

Complete ESP32 SPI bus and TMC51x0 pin configuration structure.

This structure extends TMC51x0PinConfig to include SPI bus pins, providing a single configuration structure for all GPIO pins used by the ESP32 SPI communication interface.

This allows users to define all pin assignments in one place, making it easier to manage and configure the hardware setup.

Note
SPI pins are required for SPI communication.
TMC51x0 control pins are optional and depend on the operating mode.
This is ESP32-specific and should not be in the core driver interface.

Constructor & Destructor Documentation

◆ Esp32SpiPinConfig() [1/3]

Esp32SpiPinConfig::Esp32SpiPinConfig ( )
default

Default constructor - all pins unmapped (-1)

◆ Esp32SpiPinConfig() [2/3]

Esp32SpiPinConfig::Esp32SpiPinConfig ( int mosi,
int miso,
int sclk,
int cs,
int en,
int dir = -1,
int step = -1 )
inlinenoexcept

Constructor with SPI pins and basic TMC51x0 pins.

Parameters
mosiSPI MOSI pin
misoSPI MISO pin
sclkSPI clock pin
csSPI chip select pin
enTMC5160 EN pin (required)
dirTMC5160 DIR pin (optional, -1 if not used)
stepTMC5160 STEP pin (optional, -1 if not used)

◆ Esp32SpiPinConfig() [3/3]

Esp32SpiPinConfig::Esp32SpiPinConfig ( int mosi,
int miso,
int sclk,
int cs,
const tmc51x0::TMC51x0PinConfig & tmc_pins )
inlinenoexcept

Constructor with SPI pins and full TMC5160 pin config.

Parameters
mosiSPI MOSI pin
misoSPI MISO pin
sclkSPI clock pin
csSPI chip select pin
tmc_pinsTMC5160 pin configuration structure

Member Data Documentation

◆ spi_cs

int Esp32SpiPinConfig::spi_cs {-1}

SPI chip select pin (CS)

◆ spi_miso

int Esp32SpiPinConfig::spi_miso {-1}

SPI MISO pin (Master In, Slave Out)

◆ spi_mosi

int Esp32SpiPinConfig::spi_mosi {-1}

SPI MOSI pin (Master Out, Slave In)

◆ spi_sclk

int Esp32SpiPinConfig::spi_sclk {-1}

SPI clock pin (SCLK)

◆ tmc51x0_pins

tmc51x0::TMC51x0PinConfig Esp32SpiPinConfig::tmc51x0_pins

TMC51x0 control pin configuration.


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