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
); }
16
void
TMC2660Stepper::diss2g
(
bool
B) {
SET_REG
(
diss2g
);}
17
void
TMC2660Stepper::ts2g
(uint8_t B) {
SET_REG
(
ts2g
); }
18
void
TMC2660Stepper::sdoff
(
bool
B) {
SET_REG
(
sdoff
); }
19
void
TMC2660Stepper::vsense
(
bool
B) {
SET_REG
(
vsense
);}
20
void
TMC2660Stepper::rdsel
(uint8_t B) {
SET_REG
(
rdsel
); }
21
22
bool
TMC2660Stepper::tst
() {
GET_REG
(
tst
); }
23
uint8_t
TMC2660Stepper::slph
() {
GET_REG
(
slph
); }
24
uint8_t
TMC2660Stepper::slpl
() {
GET_REG
(
slpl
); }
25
bool
TMC2660Stepper::diss2g
() {
GET_REG
(
diss2g
); }
26
uint8_t
TMC2660Stepper::ts2g
() {
GET_REG
(
ts2g
); }
27
bool
TMC2660Stepper::sdoff
() {
GET_REG
(
sdoff
); }
28
bool
TMC2660Stepper::vsense
() {
GET_REG
(
vsense
); }
29
uint8_t
TMC2660Stepper::rdsel
() {
GET_REG
(
rdsel
); }
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
src
source
DRVCONF.cpp
Generated by
1.8.17