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

X-MACRO definitions for TMC51x0 registers (TMC5130 & TMC5160) More...

#include <cstdint>
Include dependency graph for tmc51x0_register_defs.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define REGISTER_LIST(X)
 

Functions

const char * GetRegisterDef (uint8_t address)
 Get register definition string.
 

Detailed Description

X-MACRO definitions for TMC51x0 registers (TMC5130 & TMC5160)

This file uses the X-MACRO pattern to define all TMC51x0 registers with their addresses, access types, and metadata. This allows generating multiple data structures from a single source of truth. Supports both TMC5130 and TMC5160 chips.

Usage follows TMC9660 pattern: #define X(addr, name, access, category, desc) ... REGISTER_LIST(X) #undef X

Access types:

  • R: Read-only
  • W: Write-only
  • RW: Read-Write
  • RWC: Read-Write with clear behavior (some bits cleared on read/write)

Categories:

  • CONFIG: Configuration registers
  • STATUS: Status/result registers
  • MOTION: Motion control registers
  • CURRENT: Current control registers
  • CHOPPER: Chopper configuration
  • ENCODER: Encoder registers
  • MICROSTEP: Microstep lookup table
  • PROTECTION: Protection and safety
  • OTP: One-time programmable memory
  • IO: Input/Output pins

Macro Definition Documentation

◆ REGISTER_LIST

#define REGISTER_LIST ( X)

Function Documentation

◆ GetRegisterDef()

const char * GetRegisterDef ( uint8_t address)

Get register definition string.

Parameters
addressRegister address
Returns
String containing register name and description, or nullptr if not found