From d484685e02a44fe3f71dabcacea82df56aea4be9 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Sat, 17 Jul 2021 13:30:42 +0300 Subject: [PATCH] tmc2130: Registers --- src/hal/tmc2130.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/hal/tmc2130.h b/src/hal/tmc2130.h index bff12e8..f01c2f3 100644 --- a/src/hal/tmc2130.h +++ b/src/hal/tmc2130.h @@ -81,6 +81,28 @@ public: static inline bool Stall(const MotorParams ¶ms) { return gpio::ReadPin(params.sgPin) == gpio::Level::high; } + + enum class Registers : uint8_t { + /// General Configuration Registers + GCONF = 0x00, + GSTAT = 0x01, + IOIN = 0x04, + + /// Velocity Dependent Driver Feature Control Register Set + IHOLD_IRUN = 0x10, + TPOWERDOWN = 0x11, + TSTEP = 0x12, + TPWMTHRS = 0x13, + TCOOLTHRS = 0x14, + THIGH = 0x15, + + /// Motor Driver Registers + MSCNT = 0x6A, + CHOPCONF = 0x6C, + COOLCONF = 0x6D, + DRV_STATUS = 0x6F, + PWMCONF = 0x70, + }; }; } // namespace tmc2130