UUtzinger_DRV8704 0.1.0 Arduino library for the DRV8704 dual H-bridge gate driver

drv8704_regs_typedefs.h
Go to the documentation of this file.
1
6 #ifndef DRV8704_REGS_TYPEDEFS_H
7 #define DRV8704_REGS_TYPEDEFS_H
8
9 #include <stdint.h>
10
14 typedef union {
15 uint16_t all;
16 struct {
17 uint16_t enbl : 1;
18 uint16_t reserved0 : 7;
19 uint16_t isgain : 2;
20 uint16_t dtime : 2;
21 uint16_t reserved1 : 4;
22 } bit;
23 } drv8704_ctrl_reg_t;
24
28 typedef union {
29 uint16_t all;
30 struct {
31 uint16_t torque : 8;
32 uint16_t reserved : 8;
33 } bit;
34 } drv8704_torque_reg_t;
35
39 typedef union {
40 uint16_t all;
41 struct {
42 uint16_t toff : 8;
43 uint16_t pwmmode : 1;
44 uint16_t reserved : 7;
45 } bit;
46 } drv8704_off_reg_t;
47
51 typedef union {
52 uint16_t all;
53 struct {
54 uint16_t tblank : 8;
55 uint16_t reserved : 8;
56 } bit;
57 } drv8704_blank_reg_t;
58
62 typedef union {
63 uint16_t all;
64 struct {
65 uint16_t tdecay : 8;
66 uint16_t decmod : 3;
67 uint16_t reserved : 5;
68 } bit;
69 } drv8704_decay_reg_t;
70
74 typedef union {
75 uint16_t all;
76 struct {
77 uint16_t ocpth : 2;
78 uint16_t ocpdeg : 2;
79 uint16_t tdriven : 2;
80 uint16_t tdrivep : 2;
81 uint16_t idriven : 2;
82 uint16_t idrivep : 2;
83 uint16_t reserved : 4;
84 } bit;
85 } drv8704_drive_reg_t;
86
90 typedef union {
91 uint16_t all;
92 struct {
93 uint16_t ots : 1;
94 uint16_t aocp : 1;
95 uint16_t bocp : 1;
96 uint16_t apdf : 1;
97 uint16_t bpdf : 1;
98 uint16_t uvlo : 1;
99 uint16_t reserved : 10;
100 } bit;
101 } drv8704_status_reg_t;
102
103 #endif // DRV8704_REGS_TYPEDEFS_H
104
drv8704_blank_reg_t
BLANK register (0x03) view.
Definition: drv8704_regs_typedefs.h:51
drv8704_blank_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:52
drv8704_blank_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:55
drv8704_blank_reg_t::tblank
uint16_t tblank
Definition: drv8704_regs_typedefs.h:54
drv8704_ctrl_reg_t
CTRL register (0x00) view.
Definition: drv8704_regs_typedefs.h:14
drv8704_ctrl_reg_t::dtime
uint16_t dtime
Definition: drv8704_regs_typedefs.h:20
drv8704_ctrl_reg_t::enbl
uint16_t enbl
Definition: drv8704_regs_typedefs.h:17
drv8704_ctrl_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:15
drv8704_ctrl_reg_t::reserved1
uint16_t reserved1
Definition: drv8704_regs_typedefs.h:21
drv8704_ctrl_reg_t::reserved0
uint16_t reserved0
Definition: drv8704_regs_typedefs.h:18
drv8704_ctrl_reg_t::isgain
uint16_t isgain
Definition: drv8704_regs_typedefs.h:19
drv8704_decay_reg_t
DECAY register (0x04) view.
Definition: drv8704_regs_typedefs.h:62
drv8704_decay_reg_t::decmod
uint16_t decmod
Definition: drv8704_regs_typedefs.h:66
drv8704_decay_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:63
drv8704_decay_reg_t::tdecay
uint16_t tdecay
Definition: drv8704_regs_typedefs.h:65
drv8704_decay_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:67
drv8704_drive_reg_t
DRIVE register (0x06) view.
Definition: drv8704_regs_typedefs.h:74
drv8704_drive_reg_t::tdrivep
uint16_t tdrivep
Definition: drv8704_regs_typedefs.h:80
drv8704_drive_reg_t::ocpdeg
uint16_t ocpdeg
Definition: drv8704_regs_typedefs.h:78
drv8704_drive_reg_t::idrivep
uint16_t idrivep
Definition: drv8704_regs_typedefs.h:82
drv8704_drive_reg_t::tdriven
uint16_t tdriven
Definition: drv8704_regs_typedefs.h:79
drv8704_drive_reg_t::idriven
uint16_t idriven
Definition: drv8704_regs_typedefs.h:81
drv8704_drive_reg_t::ocpth
uint16_t ocpth
Definition: drv8704_regs_typedefs.h:77
drv8704_drive_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:75
drv8704_drive_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:83
drv8704_off_reg_t
OFF register (0x02) view.
Definition: drv8704_regs_typedefs.h:39
drv8704_off_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:40
drv8704_off_reg_t::pwmmode
uint16_t pwmmode
Definition: drv8704_regs_typedefs.h:43
drv8704_off_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:44
drv8704_off_reg_t::toff
uint16_t toff
Definition: drv8704_regs_typedefs.h:42
drv8704_status_reg_t
STATUS register (0x07) view.
Definition: drv8704_regs_typedefs.h:90
drv8704_status_reg_t::uvlo
uint16_t uvlo
Definition: drv8704_regs_typedefs.h:98
drv8704_status_reg_t::bpdf
uint16_t bpdf
Definition: drv8704_regs_typedefs.h:97
drv8704_status_reg_t::ots
uint16_t ots
Definition: drv8704_regs_typedefs.h:93
drv8704_status_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:99
drv8704_status_reg_t::aocp
uint16_t aocp
Definition: drv8704_regs_typedefs.h:94
drv8704_status_reg_t::bocp
uint16_t bocp
Definition: drv8704_regs_typedefs.h:95
drv8704_status_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:91
drv8704_status_reg_t::apdf
uint16_t apdf
Definition: drv8704_regs_typedefs.h:96
drv8704_torque_reg_t
TORQUE register (0x01) view.
Definition: drv8704_regs_typedefs.h:28
drv8704_torque_reg_t::torque
uint16_t torque
Definition: drv8704_regs_typedefs.h:31
drv8704_torque_reg_t::reserved
uint16_t reserved
Definition: drv8704_regs_typedefs.h:32
drv8704_torque_reg_t::all
uint16_t all
Definition: drv8704_regs_typedefs.h:29