TMCStepper
SGCSCONF.cpp
Go to the documentation of this file.
1 #include "TMCStepper.h"
2 #include "TMC_MACROS.h"
3 
4 #define SET_REG(SETTING) SGCSCONF_register.SETTING = B; write(SGCSCONF_register.address, SGCSCONF_register.sr);
5 #define GET_REG(SETTING) return SGCSCONF_register.SETTING;
6 
7 uint32_t TMC2660Stepper::SGCSCONF() { return SGCSCONF_register.sr; }
8 void TMC2660Stepper::SGCSCONF(uint32_t data) {
9  SGCSCONF_register.sr = data;
10  write(SGCSCONF_register.address, SGCSCONF_register.sr);
11 }
12 
14 void TMC2660Stepper::sgt(uint8_t B) { SET_REG(sgt); }
15 void TMC2660Stepper::cs(uint8_t B) { SET_REG(cs); }
16 
19 uint8_t TMC2660Stepper::cs() { GET_REG(cs); }
TMC2660Stepper::sgt
uint8_t sgt()
Definition: SGCSCONF.cpp:18
TMCStepper.h
TMC2660Stepper::SGCSCONF
uint32_t SGCSCONF()
Definition: SGCSCONF.cpp:7
TMC_MACROS.h
TMC2660Stepper::cs
uint8_t cs()
Definition: SGCSCONF.cpp:19
SET_REG
#define SET_REG(SETTING)
Definition: SGCSCONF.cpp:4
TMC2660Stepper::write
void write(uint8_t addressByte, uint32_t config)
Definition: TMC2660Stepper.cpp:54
TMC2660Stepper::sfilt
bool sfilt()
Definition: SGCSCONF.cpp:17
GET_REG
#define GET_REG(SETTING)
Definition: SGCSCONF.cpp:5