TMCStepper
Library supporting Trinamic Stepper Drivers for Arduino platforms
Loading...
Searching...
No Matches
TMC2209Stepper.h
Go to the documentation of this file.
1
7#pragma once
8
9#define INIT2209_REGISTER(REG) TMC2209_n::REG##_t REG##_register{}
10
12 public:
13 TMC2209Stepper(Stream * SerialPort, float RS, uint8_t addr) :
14 TMC2208Stepper(SerialPort, RS, addr) {}
15
16 #if TMCSTEPPER_SW_SERIAL
17 TMC2209Stepper(uint16_t SW_RX_pin, uint16_t SW_TX_pin, float RS, uint8_t addr) :
18 TMC2208Stepper(SW_RX_pin, SW_TX_pin, RS, addr) {}
19 #else
20 TMC2209Stepper(uint16_t, uint16_t, float, uint8_t) = delete; // Your platform does not currently support Software Serial
21 #endif
22 void push();
23
24 // R: IOIN
25 uint32_t IOIN();
26 bool enn();
27 bool ms1();
28 bool ms2();
29 bool diag();
30 bool pdn_uart();
31 bool step();
32 bool spread_en();
33 bool dir();
34 uint8_t version();
35
36 // W: TCOOLTHRS
37 uint32_t TCOOLTHRS();
38 void TCOOLTHRS(uint32_t input);
39
40 // W: SGTHRS
41 void SGTHRS(uint8_t B);
42 uint8_t SGTHRS();
43
44 // R: SG_RESULT
45 uint16_t SG_RESULT();
46
47 // W: COOLCONF
48 void COOLCONF(uint16_t B);
49 uint16_t COOLCONF();
50 void semin(uint8_t B);
51 void seup(uint8_t B);
52 void semax(uint8_t B);
53 void sedn(uint8_t B);
54 void seimin(bool B);
55 uint8_t semin();
56 uint8_t seup();
57 uint8_t semax();
58 uint8_t sedn();
59 bool seimin();
60
61 protected:
65};
TMC2208Stepper(Stream *SerialPort, float RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2)
uint16_t COOLCONF()
Definition COOLCONF.cpp:46
bool enn()
Definition IOIN.cpp:61
TMC2209Stepper(Stream *SerialPort, float RS, uint8_t addr)
INIT_REGISTER(TCOOLTHRS)
uint8_t version()
Definition IOIN.cpp:69
uint8_t semax()
Definition COOLCONF.cpp:60
bool diag()
Definition IOIN.cpp:64
uint32_t TCOOLTHRS()
INIT2209_REGISTER(COOLCONF)
bool ms1()
Definition IOIN.cpp:62
uint8_t seup()
Definition COOLCONF.cpp:59
TMC2209Stepper(uint16_t, uint16_t, float, uint8_t)=delete
uint8_t sedn()
Definition COOLCONF.cpp:61
bool ms2()
Definition IOIN.cpp:63
bool spread_en()
Definition IOIN.cpp:67
bool pdn_uart()
Definition IOIN.cpp:65
bool dir()
Definition IOIN.cpp:68
void SGTHRS(uint8_t B)
uint16_t SG_RESULT()
void COOLCONF(uint16_t B)
Definition COOLCONF.cpp:47
bool step()
Definition IOIN.cpp:66
INIT2209_REGISTER(SGTHRS)
uint32_t IOIN()
Definition IOIN.cpp:60
uint8_t semin()
Definition COOLCONF.cpp:58