nrf5340_app_pac/
qdec0_ns.rs1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Task starting the quadrature decoder"]
5 pub tasks_start: TASKS_START,
6 #[doc = "0x04 - Task stopping the quadrature decoder"]
7 pub tasks_stop: TASKS_STOP,
8 #[doc = "0x08 - Read and clear ACC and ACCDBL"]
9 pub tasks_readclracc: TASKS_READCLRACC,
10 #[doc = "0x0c - Read and clear ACC"]
11 pub tasks_rdclracc: TASKS_RDCLRACC,
12 #[doc = "0x10 - Read and clear ACCDBL"]
13 pub tasks_rdclrdbl: TASKS_RDCLRDBL,
14 _reserved5: [u8; 0x6c],
15 #[doc = "0x80 - Subscribe configuration for task START"]
16 pub subscribe_start: SUBSCRIBE_START,
17 #[doc = "0x84 - Subscribe configuration for task STOP"]
18 pub subscribe_stop: SUBSCRIBE_STOP,
19 #[doc = "0x88 - Subscribe configuration for task READCLRACC"]
20 pub subscribe_readclracc: SUBSCRIBE_READCLRACC,
21 #[doc = "0x8c - Subscribe configuration for task RDCLRACC"]
22 pub subscribe_rdclracc: SUBSCRIBE_RDCLRACC,
23 #[doc = "0x90 - Subscribe configuration for task RDCLRDBL"]
24 pub subscribe_rdclrdbl: SUBSCRIBE_RDCLRDBL,
25 _reserved10: [u8; 0x6c],
26 #[doc = "0x100 - Event being generated for every new sample value written to the SAMPLE register"]
27 pub events_samplerdy: EVENTS_SAMPLERDY,
28 #[doc = "0x104 - Non-null report ready"]
29 pub events_reportrdy: EVENTS_REPORTRDY,
30 #[doc = "0x108 - ACC or ACCDBL register overflow"]
31 pub events_accof: EVENTS_ACCOF,
32 #[doc = "0x10c - Double displacement(s) detected"]
33 pub events_dblrdy: EVENTS_DBLRDY,
34 #[doc = "0x110 - QDEC has been stopped"]
35 pub events_stopped: EVENTS_STOPPED,
36 _reserved15: [u8; 0x6c],
37 #[doc = "0x180 - Publish configuration for event SAMPLERDY"]
38 pub publish_samplerdy: PUBLISH_SAMPLERDY,
39 #[doc = "0x184 - Publish configuration for event REPORTRDY"]
40 pub publish_reportrdy: PUBLISH_REPORTRDY,
41 #[doc = "0x188 - Publish configuration for event ACCOF"]
42 pub publish_accof: PUBLISH_ACCOF,
43 #[doc = "0x18c - Publish configuration for event DBLRDY"]
44 pub publish_dblrdy: PUBLISH_DBLRDY,
45 #[doc = "0x190 - Publish configuration for event STOPPED"]
46 pub publish_stopped: PUBLISH_STOPPED,
47 _reserved20: [u8; 0x6c],
48 #[doc = "0x200 - Shortcuts between local events and tasks"]
49 pub shorts: SHORTS,
50 _reserved21: [u8; 0x0100],
51 #[doc = "0x304 - Enable interrupt"]
52 pub intenset: INTENSET,
53 #[doc = "0x308 - Disable interrupt"]
54 pub intenclr: INTENCLR,
55 _reserved23: [u8; 0x01f4],
56 #[doc = "0x500 - Enable the quadrature decoder"]
57 pub enable: ENABLE,
58 #[doc = "0x504 - LED output pin polarity"]
59 pub ledpol: LEDPOL,
60 #[doc = "0x508 - Sample period"]
61 pub sampleper: SAMPLEPER,
62 #[doc = "0x50c - Motion sample value"]
63 pub sample: SAMPLE,
64 #[doc = "0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"]
65 pub reportper: REPORTPER,
66 #[doc = "0x514 - Register accumulating the valid transitions"]
67 pub acc: ACC,
68 #[doc = "0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"]
69 pub accread: ACCREAD,
70 #[doc = "0x51c..0x528 - Unspecified"]
71 pub psel: PSEL,
72 #[doc = "0x528 - Enable input debounce filters"]
73 pub dbfen: DBFEN,
74 _reserved32: [u8; 0x14],
75 #[doc = "0x540 - Time period the LED is switched ON prior to sampling"]
76 pub ledpre: LEDPRE,
77 #[doc = "0x544 - Register accumulating the number of detected double transitions"]
78 pub accdbl: ACCDBL,
79 #[doc = "0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"]
80 pub accdblread: ACCDBLREAD,
81}
82#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
83pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
84#[doc = "Task starting the quadrature decoder"]
85pub mod tasks_start;
86#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
87pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
88#[doc = "Task stopping the quadrature decoder"]
89pub mod tasks_stop;
90#[doc = "TASKS_READCLRACC (w) register accessor: an alias for `Reg<TASKS_READCLRACC_SPEC>`"]
91pub type TASKS_READCLRACC = crate::Reg<tasks_readclracc::TASKS_READCLRACC_SPEC>;
92#[doc = "Read and clear ACC and ACCDBL"]
93pub mod tasks_readclracc;
94#[doc = "TASKS_RDCLRACC (w) register accessor: an alias for `Reg<TASKS_RDCLRACC_SPEC>`"]
95pub type TASKS_RDCLRACC = crate::Reg<tasks_rdclracc::TASKS_RDCLRACC_SPEC>;
96#[doc = "Read and clear ACC"]
97pub mod tasks_rdclracc;
98#[doc = "TASKS_RDCLRDBL (w) register accessor: an alias for `Reg<TASKS_RDCLRDBL_SPEC>`"]
99pub type TASKS_RDCLRDBL = crate::Reg<tasks_rdclrdbl::TASKS_RDCLRDBL_SPEC>;
100#[doc = "Read and clear ACCDBL"]
101pub mod tasks_rdclrdbl;
102#[doc = "SUBSCRIBE_START (rw) register accessor: an alias for `Reg<SUBSCRIBE_START_SPEC>`"]
103pub type SUBSCRIBE_START = crate::Reg<subscribe_start::SUBSCRIBE_START_SPEC>;
104#[doc = "Subscribe configuration for task START"]
105pub mod subscribe_start;
106#[doc = "SUBSCRIBE_STOP (rw) register accessor: an alias for `Reg<SUBSCRIBE_STOP_SPEC>`"]
107pub type SUBSCRIBE_STOP = crate::Reg<subscribe_stop::SUBSCRIBE_STOP_SPEC>;
108#[doc = "Subscribe configuration for task STOP"]
109pub mod subscribe_stop;
110#[doc = "SUBSCRIBE_READCLRACC (rw) register accessor: an alias for `Reg<SUBSCRIBE_READCLRACC_SPEC>`"]
111pub type SUBSCRIBE_READCLRACC = crate::Reg<subscribe_readclracc::SUBSCRIBE_READCLRACC_SPEC>;
112#[doc = "Subscribe configuration for task READCLRACC"]
113pub mod subscribe_readclracc;
114#[doc = "SUBSCRIBE_RDCLRACC (rw) register accessor: an alias for `Reg<SUBSCRIBE_RDCLRACC_SPEC>`"]
115pub type SUBSCRIBE_RDCLRACC = crate::Reg<subscribe_rdclracc::SUBSCRIBE_RDCLRACC_SPEC>;
116#[doc = "Subscribe configuration for task RDCLRACC"]
117pub mod subscribe_rdclracc;
118#[doc = "SUBSCRIBE_RDCLRDBL (rw) register accessor: an alias for `Reg<SUBSCRIBE_RDCLRDBL_SPEC>`"]
119pub type SUBSCRIBE_RDCLRDBL = crate::Reg<subscribe_rdclrdbl::SUBSCRIBE_RDCLRDBL_SPEC>;
120#[doc = "Subscribe configuration for task RDCLRDBL"]
121pub mod subscribe_rdclrdbl;
122#[doc = "EVENTS_SAMPLERDY (rw) register accessor: an alias for `Reg<EVENTS_SAMPLERDY_SPEC>`"]
123pub type EVENTS_SAMPLERDY = crate::Reg<events_samplerdy::EVENTS_SAMPLERDY_SPEC>;
124#[doc = "Event being generated for every new sample value written to the SAMPLE register"]
125pub mod events_samplerdy;
126#[doc = "EVENTS_REPORTRDY (rw) register accessor: an alias for `Reg<EVENTS_REPORTRDY_SPEC>`"]
127pub type EVENTS_REPORTRDY = crate::Reg<events_reportrdy::EVENTS_REPORTRDY_SPEC>;
128#[doc = "Non-null report ready"]
129pub mod events_reportrdy;
130#[doc = "EVENTS_ACCOF (rw) register accessor: an alias for `Reg<EVENTS_ACCOF_SPEC>`"]
131pub type EVENTS_ACCOF = crate::Reg<events_accof::EVENTS_ACCOF_SPEC>;
132#[doc = "ACC or ACCDBL register overflow"]
133pub mod events_accof;
134#[doc = "EVENTS_DBLRDY (rw) register accessor: an alias for `Reg<EVENTS_DBLRDY_SPEC>`"]
135pub type EVENTS_DBLRDY = crate::Reg<events_dblrdy::EVENTS_DBLRDY_SPEC>;
136#[doc = "Double displacement(s) detected"]
137pub mod events_dblrdy;
138#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
139pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
140#[doc = "QDEC has been stopped"]
141pub mod events_stopped;
142#[doc = "PUBLISH_SAMPLERDY (rw) register accessor: an alias for `Reg<PUBLISH_SAMPLERDY_SPEC>`"]
143pub type PUBLISH_SAMPLERDY = crate::Reg<publish_samplerdy::PUBLISH_SAMPLERDY_SPEC>;
144#[doc = "Publish configuration for event SAMPLERDY"]
145pub mod publish_samplerdy;
146#[doc = "PUBLISH_REPORTRDY (rw) register accessor: an alias for `Reg<PUBLISH_REPORTRDY_SPEC>`"]
147pub type PUBLISH_REPORTRDY = crate::Reg<publish_reportrdy::PUBLISH_REPORTRDY_SPEC>;
148#[doc = "Publish configuration for event REPORTRDY"]
149pub mod publish_reportrdy;
150#[doc = "PUBLISH_ACCOF (rw) register accessor: an alias for `Reg<PUBLISH_ACCOF_SPEC>`"]
151pub type PUBLISH_ACCOF = crate::Reg<publish_accof::PUBLISH_ACCOF_SPEC>;
152#[doc = "Publish configuration for event ACCOF"]
153pub mod publish_accof;
154#[doc = "PUBLISH_DBLRDY (rw) register accessor: an alias for `Reg<PUBLISH_DBLRDY_SPEC>`"]
155pub type PUBLISH_DBLRDY = crate::Reg<publish_dblrdy::PUBLISH_DBLRDY_SPEC>;
156#[doc = "Publish configuration for event DBLRDY"]
157pub mod publish_dblrdy;
158#[doc = "PUBLISH_STOPPED (rw) register accessor: an alias for `Reg<PUBLISH_STOPPED_SPEC>`"]
159pub type PUBLISH_STOPPED = crate::Reg<publish_stopped::PUBLISH_STOPPED_SPEC>;
160#[doc = "Publish configuration for event STOPPED"]
161pub mod publish_stopped;
162#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
163pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
164#[doc = "Shortcuts between local events and tasks"]
165pub mod shorts;
166#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
167pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
168#[doc = "Enable interrupt"]
169pub mod intenset;
170#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
171pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
172#[doc = "Disable interrupt"]
173pub mod intenclr;
174#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
175pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
176#[doc = "Enable the quadrature decoder"]
177pub mod enable;
178#[doc = "LEDPOL (rw) register accessor: an alias for `Reg<LEDPOL_SPEC>`"]
179pub type LEDPOL = crate::Reg<ledpol::LEDPOL_SPEC>;
180#[doc = "LED output pin polarity"]
181pub mod ledpol;
182#[doc = "SAMPLEPER (rw) register accessor: an alias for `Reg<SAMPLEPER_SPEC>`"]
183pub type SAMPLEPER = crate::Reg<sampleper::SAMPLEPER_SPEC>;
184#[doc = "Sample period"]
185pub mod sampleper;
186#[doc = "SAMPLE (r) register accessor: an alias for `Reg<SAMPLE_SPEC>`"]
187pub type SAMPLE = crate::Reg<sample::SAMPLE_SPEC>;
188#[doc = "Motion sample value"]
189pub mod sample;
190#[doc = "REPORTPER (rw) register accessor: an alias for `Reg<REPORTPER_SPEC>`"]
191pub type REPORTPER = crate::Reg<reportper::REPORTPER_SPEC>;
192#[doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"]
193pub mod reportper;
194#[doc = "ACC (r) register accessor: an alias for `Reg<ACC_SPEC>`"]
195pub type ACC = crate::Reg<acc::ACC_SPEC>;
196#[doc = "Register accumulating the valid transitions"]
197pub mod acc;
198#[doc = "ACCREAD (r) register accessor: an alias for `Reg<ACCREAD_SPEC>`"]
199pub type ACCREAD = crate::Reg<accread::ACCREAD_SPEC>;
200#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"]
201pub mod accread;
202#[doc = "Unspecified"]
203pub use psel::PSEL;
204#[doc = r"Cluster"]
205#[doc = "Unspecified"]
206pub mod psel;
207#[doc = "DBFEN (rw) register accessor: an alias for `Reg<DBFEN_SPEC>`"]
208pub type DBFEN = crate::Reg<dbfen::DBFEN_SPEC>;
209#[doc = "Enable input debounce filters"]
210pub mod dbfen;
211#[doc = "LEDPRE (rw) register accessor: an alias for `Reg<LEDPRE_SPEC>`"]
212pub type LEDPRE = crate::Reg<ledpre::LEDPRE_SPEC>;
213#[doc = "Time period the LED is switched ON prior to sampling"]
214pub mod ledpre;
215#[doc = "ACCDBL (r) register accessor: an alias for `Reg<ACCDBL_SPEC>`"]
216pub type ACCDBL = crate::Reg<accdbl::ACCDBL_SPEC>;
217#[doc = "Register accumulating the number of detected double transitions"]
218pub mod accdbl;
219#[doc = "ACCDBLREAD (r) register accessor: an alias for `Reg<ACCDBLREAD_SPEC>`"]
220pub type ACCDBLREAD = crate::Reg<accdblread::ACCDBLREAD_SPEC>;
221#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"]
222pub mod accdblread;