TMCStepper
Library supporting Trinamic Stepper Drivers for Arduino platforms
Loading...
Searching...
No Matches
TMC2160_bitfields.h
Go to the documentation of this file.
1
11#pragma once
12#pragma pack(push, 1)
13
14namespace TMC2160_n {
15 struct IOIN_t {
16 constexpr static uint8_t address = 0x04;
17 union {
18 uint32_t sr;
19 struct {
20 bool refl_step : 1,
26 : 2;
28 uint8_t version : 8;
29 };
30 };
31 };
32
33 struct PWMCONF_t {
34 constexpr static uint8_t address = 0x70;
35 union {
36 uint32_t sr; // 0xC40C001E
37 struct {
38 uint8_t pwm_ofs : 8, // 30
39 pwm_grad : 8, // 0
40 pwm_freq : 2; // 0
41 bool pwm_autoscale : 1, // true
42 pwm_autograd : 1; // true
43 uint8_t freewheel : 2, // 0
44 : 2,
45 pwm_reg : 4, // 4
46 pwm_lim : 4; // 12
47 };
48 };
49 };
50
51 struct PWM_SCALE_t {
52 constexpr static uint8_t address = 0x71;
53 union {
54 uint32_t sr : 25;
55 struct {
56 uint8_t pwm_scale_sum : 8,
57 : 8;
58 uint16_t pwm_scale_auto : 9;
59 };
60 };
61 };
62}
63
64#pragma pack(pop)
static constexpr uint8_t address
uint8_t uint16_t pwm_scale_auto
static constexpr uint8_t address
static constexpr uint8_t address