1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 _reserved0: [u8; 0x04],
5 #[doc = "0x04 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"]
6 pub tasks_stop: TASKS_STOP,
7 #[doc = "0x08..0x10 - Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start if not running."]
8 pub tasks_seqstart: [TASKS_SEQSTART; 2],
9 #[doc = "0x10 - Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start if not running."]
10 pub tasks_nextstep: TASKS_NEXTSTEP,
11 _reserved3: [u8; 0x70],
12 #[doc = "0x84 - Subscribe configuration for task STOP"]
13 pub subscribe_stop: SUBSCRIBE_STOP,
14 #[doc = "0x88..0x90 - Description collection: Subscribe configuration for task SEQSTART\\[n\\]"]
15 pub subscribe_seqstart: [SUBSCRIBE_SEQSTART; 2],
16 #[doc = "0x90 - Subscribe configuration for task NEXTSTEP"]
17 pub subscribe_nextstep: SUBSCRIBE_NEXTSTEP,
18 _reserved6: [u8; 0x70],
19 #[doc = "0x104 - Response to STOP task, emitted when PWM pulses are no longer generated"]
20 pub events_stopped: EVENTS_STOPPED,
21 #[doc = "0x108..0x110 - Description collection: First PWM period started on sequence n"]
22 pub events_seqstarted: [EVENTS_SEQSTARTED; 2],
23 #[doc = "0x110..0x118 - Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"]
24 pub events_seqend: [EVENTS_SEQEND; 2],
25 #[doc = "0x118 - Emitted at the end of each PWM period"]
26 pub events_pwmperiodend: EVENTS_PWMPERIODEND,
27 #[doc = "0x11c - Concatenated sequences have been played the amount of times defined in LOOP.CNT"]
28 pub events_loopsdone: EVENTS_LOOPSDONE,
29 _reserved11: [u8; 0x64],
30 #[doc = "0x184 - Publish configuration for event STOPPED"]
31 pub publish_stopped: PUBLISH_STOPPED,
32 #[doc = "0x188..0x190 - Description collection: Publish configuration for event SEQSTARTED\\[n\\]"]
33 pub publish_seqstarted: [PUBLISH_SEQSTARTED; 2],
34 #[doc = "0x190..0x198 - Description collection: Publish configuration for event SEQEND\\[n\\]"]
35 pub publish_seqend: [PUBLISH_SEQEND; 2],
36 #[doc = "0x198 - Publish configuration for event PWMPERIODEND"]
37 pub publish_pwmperiodend: PUBLISH_PWMPERIODEND,
38 #[doc = "0x19c - Publish configuration for event LOOPSDONE"]
39 pub publish_loopsdone: PUBLISH_LOOPSDONE,
40 _reserved16: [u8; 0x60],
41 #[doc = "0x200 - Shortcuts between local events and tasks"]
42 pub shorts: SHORTS,
43 _reserved17: [u8; 0xfc],
44 #[doc = "0x300 - Enable or disable interrupt"]
45 pub inten: INTEN,
46 #[doc = "0x304 - Enable interrupt"]
47 pub intenset: INTENSET,
48 #[doc = "0x308 - Disable interrupt"]
49 pub intenclr: INTENCLR,
50 _reserved20: [u8; 0x01f4],
51 #[doc = "0x500 - PWM module enable register"]
52 pub enable: ENABLE,
53 #[doc = "0x504 - Selects operating mode of the wave counter"]
54 pub mode: MODE,
55 #[doc = "0x508 - Value up to which the pulse generator counter counts"]
56 pub countertop: COUNTERTOP,
57 #[doc = "0x50c - Configuration for PWM_CLK"]
58 pub prescaler: PRESCALER,
59 #[doc = "0x510 - Configuration of the decoder"]
60 pub decoder: DECODER,
61 #[doc = "0x514 - Number of playbacks of a loop"]
62 pub loop_: LOOP,
63 _reserved26: [u8; 0x08],
64 #[doc = "0x520..0x530 - Unspecified"]
65 pub seq0: SEQ,
66 _reserved27: [u8; 0x10],
67 #[doc = "0x540..0x550 - Unspecified"]
68 pub seq1: SEQ,
69 _reserved28: [u8; 0x10],
70 #[doc = "0x560..0x570 - Unspecified"]
71 pub psel: PSEL,
72}
73#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
74pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
75#[doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"]
76pub mod tasks_stop;
77#[doc = "TASKS_SEQSTART (w) register accessor: an alias for `Reg<TASKS_SEQSTART_SPEC>`"]
78pub type TASKS_SEQSTART = crate::Reg<tasks_seqstart::TASKS_SEQSTART_SPEC>;
79#[doc = "Description collection: Loads the first PWM value on all enabled channels from sequence n, and starts playing that sequence at the rate defined in SEQ\\[n\\]REFRESH and/or DECODER.MODE. Causes PWM generation to start if not running."]
80pub mod tasks_seqstart;
81#[doc = "TASKS_NEXTSTEP (w) register accessor: an alias for `Reg<TASKS_NEXTSTEP_SPEC>`"]
82pub type TASKS_NEXTSTEP = crate::Reg<tasks_nextstep::TASKS_NEXTSTEP_SPEC>;
83#[doc = "Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep. Does not cause PWM generation to start if not running."]
84pub mod tasks_nextstep;
85#[doc = "SUBSCRIBE_STOP (rw) register accessor: an alias for `Reg<SUBSCRIBE_STOP_SPEC>`"]
86pub type SUBSCRIBE_STOP = crate::Reg<subscribe_stop::SUBSCRIBE_STOP_SPEC>;
87#[doc = "Subscribe configuration for task STOP"]
88pub mod subscribe_stop;
89#[doc = "SUBSCRIBE_SEQSTART (rw) register accessor: an alias for `Reg<SUBSCRIBE_SEQSTART_SPEC>`"]
90pub type SUBSCRIBE_SEQSTART = crate::Reg<subscribe_seqstart::SUBSCRIBE_SEQSTART_SPEC>;
91#[doc = "Description collection: Subscribe configuration for task SEQSTART\\[n\\]"]
92pub mod subscribe_seqstart;
93#[doc = "SUBSCRIBE_NEXTSTEP (rw) register accessor: an alias for `Reg<SUBSCRIBE_NEXTSTEP_SPEC>`"]
94pub type SUBSCRIBE_NEXTSTEP = crate::Reg<subscribe_nextstep::SUBSCRIBE_NEXTSTEP_SPEC>;
95#[doc = "Subscribe configuration for task NEXTSTEP"]
96pub mod subscribe_nextstep;
97#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
98pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
99#[doc = "Response to STOP task, emitted when PWM pulses are no longer generated"]
100pub mod events_stopped;
101#[doc = "EVENTS_SEQSTARTED (rw) register accessor: an alias for `Reg<EVENTS_SEQSTARTED_SPEC>`"]
102pub type EVENTS_SEQSTARTED = crate::Reg<events_seqstarted::EVENTS_SEQSTARTED_SPEC>;
103#[doc = "Description collection: First PWM period started on sequence n"]
104pub mod events_seqstarted;
105#[doc = "EVENTS_SEQEND (rw) register accessor: an alias for `Reg<EVENTS_SEQEND_SPEC>`"]
106pub type EVENTS_SEQEND = crate::Reg<events_seqend::EVENTS_SEQEND_SPEC>;
107#[doc = "Description collection: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"]
108pub mod events_seqend;
109#[doc = "EVENTS_PWMPERIODEND (rw) register accessor: an alias for `Reg<EVENTS_PWMPERIODEND_SPEC>`"]
110pub type EVENTS_PWMPERIODEND = crate::Reg<events_pwmperiodend::EVENTS_PWMPERIODEND_SPEC>;
111#[doc = "Emitted at the end of each PWM period"]
112pub mod events_pwmperiodend;
113#[doc = "EVENTS_LOOPSDONE (rw) register accessor: an alias for `Reg<EVENTS_LOOPSDONE_SPEC>`"]
114pub type EVENTS_LOOPSDONE = crate::Reg<events_loopsdone::EVENTS_LOOPSDONE_SPEC>;
115#[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT"]
116pub mod events_loopsdone;
117#[doc = "PUBLISH_STOPPED (rw) register accessor: an alias for `Reg<PUBLISH_STOPPED_SPEC>`"]
118pub type PUBLISH_STOPPED = crate::Reg<publish_stopped::PUBLISH_STOPPED_SPEC>;
119#[doc = "Publish configuration for event STOPPED"]
120pub mod publish_stopped;
121#[doc = "PUBLISH_SEQSTARTED (rw) register accessor: an alias for `Reg<PUBLISH_SEQSTARTED_SPEC>`"]
122pub type PUBLISH_SEQSTARTED = crate::Reg<publish_seqstarted::PUBLISH_SEQSTARTED_SPEC>;
123#[doc = "Description collection: Publish configuration for event SEQSTARTED\\[n\\]"]
124pub mod publish_seqstarted;
125#[doc = "PUBLISH_SEQEND (rw) register accessor: an alias for `Reg<PUBLISH_SEQEND_SPEC>`"]
126pub type PUBLISH_SEQEND = crate::Reg<publish_seqend::PUBLISH_SEQEND_SPEC>;
127#[doc = "Description collection: Publish configuration for event SEQEND\\[n\\]"]
128pub mod publish_seqend;
129#[doc = "PUBLISH_PWMPERIODEND (rw) register accessor: an alias for `Reg<PUBLISH_PWMPERIODEND_SPEC>`"]
130pub type PUBLISH_PWMPERIODEND = crate::Reg<publish_pwmperiodend::PUBLISH_PWMPERIODEND_SPEC>;
131#[doc = "Publish configuration for event PWMPERIODEND"]
132pub mod publish_pwmperiodend;
133#[doc = "PUBLISH_LOOPSDONE (rw) register accessor: an alias for `Reg<PUBLISH_LOOPSDONE_SPEC>`"]
134pub type PUBLISH_LOOPSDONE = crate::Reg<publish_loopsdone::PUBLISH_LOOPSDONE_SPEC>;
135#[doc = "Publish configuration for event LOOPSDONE"]
136pub mod publish_loopsdone;
137#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
138pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
139#[doc = "Shortcuts between local events and tasks"]
140pub mod shorts;
141#[doc = "INTEN (rw) register accessor: an alias for `Reg<INTEN_SPEC>`"]
142pub type INTEN = crate::Reg<inten::INTEN_SPEC>;
143#[doc = "Enable or disable interrupt"]
144pub mod inten;
145#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
146pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
147#[doc = "Enable interrupt"]
148pub mod intenset;
149#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
150pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
151#[doc = "Disable interrupt"]
152pub mod intenclr;
153#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
154pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
155#[doc = "PWM module enable register"]
156pub mod enable;
157#[doc = "MODE (rw) register accessor: an alias for `Reg<MODE_SPEC>`"]
158pub type MODE = crate::Reg<mode::MODE_SPEC>;
159#[doc = "Selects operating mode of the wave counter"]
160pub mod mode;
161#[doc = "COUNTERTOP (rw) register accessor: an alias for `Reg<COUNTERTOP_SPEC>`"]
162pub type COUNTERTOP = crate::Reg<countertop::COUNTERTOP_SPEC>;
163#[doc = "Value up to which the pulse generator counter counts"]
164pub mod countertop;
165#[doc = "PRESCALER (rw) register accessor: an alias for `Reg<PRESCALER_SPEC>`"]
166pub type PRESCALER = crate::Reg<prescaler::PRESCALER_SPEC>;
167#[doc = "Configuration for PWM_CLK"]
168pub mod prescaler;
169#[doc = "DECODER (rw) register accessor: an alias for `Reg<DECODER_SPEC>`"]
170pub type DECODER = crate::Reg<decoder::DECODER_SPEC>;
171#[doc = "Configuration of the decoder"]
172pub mod decoder;
173#[doc = "LOOP (rw) register accessor: an alias for `Reg<LOOP_SPEC>`"]
174pub type LOOP = crate::Reg<loop_::LOOP_SPEC>;
175#[doc = "Number of playbacks of a loop"]
176pub mod loop_;
177#[doc = "Unspecified"]
178pub use seq::SEQ;
179#[doc = r"Cluster"]
180#[doc = "Unspecified"]
181pub mod seq;
182#[doc = "Unspecified"]
183pub use psel::PSEL;
184#[doc = r"Cluster"]
185#[doc = "Unspecified"]
186pub mod psel;