TMCStepper
DRVCONF.cpp
Go to the documentation of this file.
1 #include "TMCStepper.h"
2 #include "TMC_MACROS.h"
3 
4 #define SET_REG(SETTING) DRVCONF_register.SETTING = B; write(DRVCONF_register.address, DRVCONF_register.sr)
5 #define GET_REG(SETTING) return DRVCONF_register.SETTING;
6 
7 uint32_t TMC2660Stepper::DRVCONF() { return DRVCONF_register.sr; }
8 void TMC2660Stepper::DRVCONF(uint32_t data) {
9  DRVCONF_register.sr = data;
10  write(DRVCONF_register.address, DRVCONF_register.sr);
11 }
12 
13 void TMC2660Stepper::tst(bool B) { SET_REG(tst); }
14 void TMC2660Stepper::slph(uint8_t B) { SET_REG(slph); }
15 void TMC2660Stepper::slpl(uint8_t B) { SET_REG(slpl); }
17 void TMC2660Stepper::ts2g(uint8_t B) { SET_REG(ts2g); }
20 void TMC2660Stepper::rdsel(uint8_t B) { SET_REG(rdsel); }
21 
TMC2660Stepper::slph
uint8_t slph()
Definition: DRVCONF.cpp:23
GET_REG
#define GET_REG(SETTING)
Definition: DRVCONF.cpp:5
SET_REG
#define SET_REG(SETTING)
Definition: DRVCONF.cpp:4
TMCStepper.h
TMC2660Stepper::ts2g
uint8_t ts2g()
Definition: DRVCONF.cpp:26
TMC2660Stepper::DRVCONF
uint32_t DRVCONF()
Definition: DRVCONF.cpp:7
TMC_MACROS.h
TMC2660Stepper::vsense
bool vsense()
Definition: DRVCONF.cpp:28
TMC2660Stepper::sdoff
bool sdoff()
Definition: DRVCONF.cpp:27
TMC2660Stepper::write
void write(uint8_t addressByte, uint32_t config)
Definition: TMC2660Stepper.cpp:54
TMC2660Stepper::tst
bool tst()
Definition: DRVCONF.cpp:22
TMC2660Stepper::diss2g
bool diss2g()
Definition: DRVCONF.cpp:25
TMC2660Stepper::slpl
uint8_t slpl()
Definition: DRVCONF.cpp:24
TMC2660Stepper::rdsel
uint8_t rdsel()
Definition: DRVCONF.cpp:29