TMCStepper
SW_MODE.cpp
Go to the documentation of this file.
1 #include "TMCStepper.h"
2 #include "TMC_MACROS.h"
3 
4 #define SET_REG(SETTING) SW_MODE_register.SETTING = B; write(SW_MODE_register.address, SW_MODE_register.sr)
5 #define GET_REG(SETTING) SW_MODE_t r{0}; r.sr = SW_MODE(); return r.SETTING
6 
7 // SW_MODE
9  return read(SW_MODE_register.address);
10 }
11 void TMC5130Stepper::SW_MODE(uint32_t input) {
12  SW_MODE_register.sr = input;
13  write(SW_MODE_register.address, SW_MODE_register.sr);
14 }
15 
28 
TMC5130Stepper::en_latch_encoder
bool en_latch_encoder()
Definition: SW_MODE.cpp:37
TMC5130Stepper::latch_r_active
bool latch_r_active()
Definition: SW_MODE.cpp:35
TMC5130Stepper::en_softstop
bool en_softstop()
Definition: SW_MODE.cpp:39
GET_REG
#define GET_REG(SETTING)
Definition: SW_MODE.cpp:5
TMC5130Stepper::pol_stop_r
bool pol_stop_r()
Definition: SW_MODE.cpp:31
TMC5130Stepper::latch_l_inactive
bool latch_l_inactive()
Definition: SW_MODE.cpp:34
TMC5130Stepper::stop_l_enable
void stop_l_enable(bool B)
Definition: SW_MODE.cpp:16
TMCStepper.h
TMC5130Stepper::SW_MODE
uint32_t SW_MODE()
Definition: SW_MODE.cpp:8
TMC5130Stepper::swap_lr
bool swap_lr()
Definition: SW_MODE.cpp:32
TMC2130Stepper::read
uint32_t read(uint8_t addressByte)
Definition: TMC2130Stepper.cpp:65
TMC_MACROS.h
TMC5130Stepper::stop_r_enable
bool stop_r_enable()
Definition: SW_MODE.cpp:29
TMC5130Stepper::latch_l_active
bool latch_l_active()
Definition: SW_MODE.cpp:33
TMC5130Stepper::latch_r_inactive
bool latch_r_inactive()
Definition: SW_MODE.cpp:36
TMC5130Stepper::sg_stop
bool sg_stop()
Definition: SW_MODE.cpp:38
SET_REG
#define SET_REG(SETTING)
Definition: SW_MODE.cpp:4
TMC2130Stepper::write
void write(uint8_t addressByte, uint32_t config)
Definition: TMC2130Stepper.cpp:148
TMC5130Stepper::pol_stop_l
bool pol_stop_l()
Definition: SW_MODE.cpp:30