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

ESP32-specific communication interfaces for TMC51x0 using SPI and UART (TMC5130 & TMC51x0) More...

#include "tmc51x0_comm_interface.hpp"
#include "driver/gpio.h"
#include "driver/ledc.h"
#include "driver/spi_master.h"
#include "driver/uart.h"
#include "esp_log.h"
#include "esp_rom_sys.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/task.h"
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
Include dependency graph for esp32_tmc51x0_bus.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Esp32SpiPinConfig
 Complete ESP32 SPI bus and TMC51x0 pin configuration structure. More...
 
class  Esp32SPI
 ESP32 SPI implementation of TMC51x0 communication interface. More...
 
struct  Esp32UartPinConfig
 ESP32 UART pin configuration structure. More...
 
class  Esp32UART
 ESP32 UART implementation of TMC51x0 communication interface. More...
 

Variables

static const char * BUS_TAG = "TMC51x0_Bus"
 

Detailed Description

ESP32-specific communication interfaces for TMC51x0 using SPI and UART (TMC5130 & TMC51x0)

This file provides ESP32-specific implementations of the TMC51x0 communication interfaces using ESP-IDF SPI and UART drivers. Supports both TMC5130 and TMC51x0 chips.

Pin Configuration Support:

  • Supports all TMC51x0 control pins (EN, DIR, STEP, REFL_STEP, REFR_DIR, DIAG0, DIAG1, ENCA, ENCB, ENCN, CLK)
  • Supports user-defined GPIO pins for custom board configurations
  • Diagnostic pins (DIAG0, DIAG1) can be read via GpioRead()
  • Reference switch pins (REFL_STEP, REFR_DIR) can be read/written depending on mode
  • Encoder pins (ENCA, ENCB, ENCN) can be read depending on mode
  • CLK pin can be configured for external clock input (PWM support via user implementation)
Author
Nebiyu Tadesse
Date
2025

Variable Documentation

◆ BUS_TAG

const char* BUS_TAG = "TMC51x0_Bus"
static