TMCStepper
ENCMODE.cpp
Go to the documentation of this file.
1 #include "TMCStepper.h"
2 #include "TMC_MACROS.h"
3 
4 #define SET_REG(SETTING) ENCMODE_register.SETTING = B; write(ENCMODE_register.address, ENCMODE_register.sr);
5 #define GET_REG(SETTING) ENCMODE_t r{0}; r.sr = ENCMODE(); return r.SETTING;
6 
7 // ENCMODE
9  return read(ENCMODE_register.address);
10 }
11 void TMC5130Stepper::ENCMODE(uint32_t input) {
12  ENCMODE_register.sr = input;
13  write(ENCMODE_register.address, ENCMODE_register.sr);
14 }
15 
27 
TMC5130Stepper::pol_n
bool pol_n()
Definition: ENCMODE.cpp:30
TMC5130Stepper::neg_edge
bool neg_edge()
Definition: ENCMODE.cpp:35
TMC5130Stepper::latch_x_act
bool latch_x_act()
Definition: ENCMODE.cpp:37
TMC5130Stepper::enc_sel_decimal
bool enc_sel_decimal()
Definition: ENCMODE.cpp:38
TMC5130Stepper::ignore_ab
bool ignore_ab()
Definition: ENCMODE.cpp:31
TMCStepper.h
TMC5130Stepper::pos_edge
bool pos_edge()
Definition: ENCMODE.cpp:34
TMC2130Stepper::read
uint32_t read(uint8_t addressByte)
Definition: TMC2130Stepper.cpp:65
TMC5130Stepper::pol_b
bool pol_b()
Definition: ENCMODE.cpp:29
GET_REG
#define GET_REG(SETTING)
Definition: ENCMODE.cpp:5
TMC_MACROS.h
TMC5130Stepper::clr_enc_x
bool clr_enc_x()
Definition: ENCMODE.cpp:36
TMC5130Stepper::pol_a
bool pol_a()
Definition: ENCMODE.cpp:28
TMC5130Stepper::clr_cont
bool clr_cont()
Definition: ENCMODE.cpp:32
TMC2130Stepper::write
void write(uint8_t addressByte, uint32_t config)
Definition: TMC2130Stepper.cpp:148
SET_REG
#define SET_REG(SETTING)
Definition: ENCMODE.cpp:4
TMC5130Stepper::ENCMODE
uint32_t ENCMODE()
Definition: ENCMODE.cpp:8
TMC5130Stepper::clr_once
bool clr_once()
Definition: ENCMODE.cpp:33