1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Start the quadrature decoder."]
5 pub tasks_start: TASKS_START,
6 #[doc = "0x04 - Stop the quadrature decoder."]
7 pub tasks_stop: TASKS_STOP,
8 #[doc = "0x08 - Transfers the content from ACC registers to ACCREAD registers, and clears the ACC registers."]
9 pub tasks_readclracc: TASKS_READCLRACC,
10 _reserved3: [u8; 0xf4],
11 #[doc = "0x100 - A new sample is written to the sample register."]
12 pub events_samplerdy: EVENTS_SAMPLERDY,
13 #[doc = "0x104 - REPORTPER number of samples accumulated in ACC register, and ACC register different than zero."]
14 pub events_reportrdy: EVENTS_REPORTRDY,
15 #[doc = "0x108 - ACC or ACCDBL register overflow."]
16 pub events_accof: EVENTS_ACCOF,
17 _reserved6: [u8; 0xf4],
18 #[doc = "0x200 - Shortcuts for the QDEC."]
19 pub shorts: SHORTS,
20 _reserved7: [u8; 0x0100],
21 #[doc = "0x304 - Interrupt enable set register."]
22 pub intenset: INTENSET,
23 #[doc = "0x308 - Interrupt enable clear register."]
24 pub intenclr: INTENCLR,
25 _reserved9: [u8; 0x01f4],
26 #[doc = "0x500 - Enable the QDEC."]
27 pub enable: ENABLE,
28 #[doc = "0x504 - LED output pin polarity."]
29 pub ledpol: LEDPOL,
30 #[doc = "0x508 - Sample period."]
31 pub sampleper: SAMPLEPER,
32 #[doc = "0x50c - Motion sample value."]
33 pub sample: SAMPLE,
34 #[doc = "0x510 - Number of samples to generate an EVENT_REPORTRDY."]
35 pub reportper: REPORTPER,
36 #[doc = "0x514 - Accumulated valid transitions register."]
37 pub acc: ACC,
38 #[doc = "0x518 - Snapshot of ACC register. Value generated by the TASKS_READCLEACC task."]
39 pub accread: ACCREAD,
40 #[doc = "0x51c - Pin select for LED output."]
41 pub pselled: PSELLED,
42 #[doc = "0x520 - Pin select for phase A input."]
43 pub psela: PSELA,
44 #[doc = "0x524 - Pin select for phase B input."]
45 pub pselb: PSELB,
46 #[doc = "0x528 - Enable debouncer input filters."]
47 pub dbfen: DBFEN,
48 _reserved20: [u8; 0x14],
49 #[doc = "0x540 - Time LED is switched ON before the sample."]
50 pub ledpre: LEDPRE,
51 #[doc = "0x544 - Accumulated double (error) transitions register."]
52 pub accdbl: ACCDBL,
53 #[doc = "0x548 - Snapshot of ACCDBL register. Value generated by the TASKS_READCLEACC task."]
54 pub accdblread: ACCDBLREAD,
55 _reserved23: [u8; 0x0ab0],
56 #[doc = "0xffc - Peripheral power control."]
57 pub power: POWER,
58}
59#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
60pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
61#[doc = "Start the quadrature decoder."]
62pub mod tasks_start;
63#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
64pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
65#[doc = "Stop the quadrature decoder."]
66pub mod tasks_stop;
67#[doc = "TASKS_READCLRACC (w) register accessor: an alias for `Reg<TASKS_READCLRACC_SPEC>`"]
68pub type TASKS_READCLRACC = crate::Reg<tasks_readclracc::TASKS_READCLRACC_SPEC>;
69#[doc = "Transfers the content from ACC registers to ACCREAD registers, and clears the ACC registers."]
70pub mod tasks_readclracc;
71#[doc = "EVENTS_SAMPLERDY (rw) register accessor: an alias for `Reg<EVENTS_SAMPLERDY_SPEC>`"]
72pub type EVENTS_SAMPLERDY = crate::Reg<events_samplerdy::EVENTS_SAMPLERDY_SPEC>;
73#[doc = "A new sample is written to the sample register."]
74pub mod events_samplerdy;
75#[doc = "EVENTS_REPORTRDY (rw) register accessor: an alias for `Reg<EVENTS_REPORTRDY_SPEC>`"]
76pub type EVENTS_REPORTRDY = crate::Reg<events_reportrdy::EVENTS_REPORTRDY_SPEC>;
77#[doc = "REPORTPER number of samples accumulated in ACC register, and ACC register different than zero."]
78pub mod events_reportrdy;
79#[doc = "EVENTS_ACCOF (rw) register accessor: an alias for `Reg<EVENTS_ACCOF_SPEC>`"]
80pub type EVENTS_ACCOF = crate::Reg<events_accof::EVENTS_ACCOF_SPEC>;
81#[doc = "ACC or ACCDBL register overflow."]
82pub mod events_accof;
83#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
84pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
85#[doc = "Shortcuts for the QDEC."]
86pub mod shorts;
87#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
88pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
89#[doc = "Interrupt enable set register."]
90pub mod intenset;
91#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
92pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
93#[doc = "Interrupt enable clear register."]
94pub mod intenclr;
95#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
96pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
97#[doc = "Enable the QDEC."]
98pub mod enable;
99#[doc = "LEDPOL (rw) register accessor: an alias for `Reg<LEDPOL_SPEC>`"]
100pub type LEDPOL = crate::Reg<ledpol::LEDPOL_SPEC>;
101#[doc = "LED output pin polarity."]
102pub mod ledpol;
103#[doc = "SAMPLEPER (rw) register accessor: an alias for `Reg<SAMPLEPER_SPEC>`"]
104pub type SAMPLEPER = crate::Reg<sampleper::SAMPLEPER_SPEC>;
105#[doc = "Sample period."]
106pub mod sampleper;
107#[doc = "SAMPLE (r) register accessor: an alias for `Reg<SAMPLE_SPEC>`"]
108pub type SAMPLE = crate::Reg<sample::SAMPLE_SPEC>;
109#[doc = "Motion sample value."]
110pub mod sample;
111#[doc = "REPORTPER (rw) register accessor: an alias for `Reg<REPORTPER_SPEC>`"]
112pub type REPORTPER = crate::Reg<reportper::REPORTPER_SPEC>;
113#[doc = "Number of samples to generate an EVENT_REPORTRDY."]
114pub mod reportper;
115#[doc = "ACC (r) register accessor: an alias for `Reg<ACC_SPEC>`"]
116pub type ACC = crate::Reg<acc::ACC_SPEC>;
117#[doc = "Accumulated valid transitions register."]
118pub mod acc;
119#[doc = "ACCREAD (r) register accessor: an alias for `Reg<ACCREAD_SPEC>`"]
120pub type ACCREAD = crate::Reg<accread::ACCREAD_SPEC>;
121#[doc = "Snapshot of ACC register. Value generated by the TASKS_READCLEACC task."]
122pub mod accread;
123#[doc = "PSELLED (rw) register accessor: an alias for `Reg<PSELLED_SPEC>`"]
124pub type PSELLED = crate::Reg<pselled::PSELLED_SPEC>;
125#[doc = "Pin select for LED output."]
126pub mod pselled;
127#[doc = "PSELA (rw) register accessor: an alias for `Reg<PSELA_SPEC>`"]
128pub type PSELA = crate::Reg<psela::PSELA_SPEC>;
129#[doc = "Pin select for phase A input."]
130pub mod psela;
131#[doc = "PSELB (rw) register accessor: an alias for `Reg<PSELB_SPEC>`"]
132pub type PSELB = crate::Reg<pselb::PSELB_SPEC>;
133#[doc = "Pin select for phase B input."]
134pub mod pselb;
135#[doc = "DBFEN (rw) register accessor: an alias for `Reg<DBFEN_SPEC>`"]
136pub type DBFEN = crate::Reg<dbfen::DBFEN_SPEC>;
137#[doc = "Enable debouncer input filters."]
138pub mod dbfen;
139#[doc = "LEDPRE (rw) register accessor: an alias for `Reg<LEDPRE_SPEC>`"]
140pub type LEDPRE = crate::Reg<ledpre::LEDPRE_SPEC>;
141#[doc = "Time LED is switched ON before the sample."]
142pub mod ledpre;
143#[doc = "ACCDBL (r) register accessor: an alias for `Reg<ACCDBL_SPEC>`"]
144pub type ACCDBL = crate::Reg<accdbl::ACCDBL_SPEC>;
145#[doc = "Accumulated double (error) transitions register."]
146pub mod accdbl;
147#[doc = "ACCDBLREAD (r) register accessor: an alias for `Reg<ACCDBLREAD_SPEC>`"]
148pub type ACCDBLREAD = crate::Reg<accdblread::ACCDBLREAD_SPEC>;
149#[doc = "Snapshot of ACCDBL register. Value generated by the TASKS_READCLEACC task."]
150pub mod accdblread;
151#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
152pub type POWER = crate::Reg<power::POWER_SPEC>;
153#[doc = "Peripheral power control."]
154pub mod power;