#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 0x04], #[doc = "0x04 - Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] pub tasks_stop: TASKS_STOP, #[doc = "0x08..0x10 - Description collection\\[n\\]: 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."] pub tasks_seqstart: [TASKS_SEQSTART; 2], #[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."] pub tasks_nextstep: TASKS_NEXTSTEP, _reserved3: [u8; 0xf0], #[doc = "0x104 - Response to STOP task, emitted when PWM pulses are no longer generated"] pub events_stopped: EVENTS_STOPPED, #[doc = "0x108..0x110 - Description collection\\[n\\]: First PWM period started on sequence n"] pub events_seqstarted: [EVENTS_SEQSTARTED; 2], #[doc = "0x110..0x118 - Description collection\\[n\\]: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] pub events_seqend: [EVENTS_SEQEND; 2], #[doc = "0x118 - Emitted at the end of each PWM period"] pub events_pwmperiodend: EVENTS_PWMPERIODEND, #[doc = "0x11c - Concatenated sequences have been played the amount of times defined in LOOP.CNT"] pub events_loopsdone: EVENTS_LOOPSDONE, _reserved8: [u8; 0xe0], #[doc = "0x200 - Shortcut register"] pub shorts: SHORTS, _reserved9: [u8; 0xfc], #[doc = "0x300 - Enable or disable interrupt"] pub inten: INTEN, #[doc = "0x304 - Enable interrupt"] pub intenset: INTENSET, #[doc = "0x308 - Disable interrupt"] pub intenclr: INTENCLR, _reserved12: [u8; 0x01f4], #[doc = "0x500 - PWM module enable register"] pub enable: ENABLE, #[doc = "0x504 - Selects operating mode of the wave counter"] pub mode: MODE, #[doc = "0x508 - Value up to which the pulse generator counter counts"] pub countertop: COUNTERTOP, #[doc = "0x50c - Configuration for PWM_CLK"] pub prescaler: PRESCALER, #[doc = "0x510 - Configuration of the decoder"] pub decoder: DECODER, #[doc = "0x514 - Number of playbacks of a loop"] pub loop_: LOOP, _reserved18: [u8; 0x08], #[doc = "0x520..0x530 - Unspecified"] pub seq0: SEQ, _reserved19: [u8; 0x10], #[doc = "0x540..0x550 - Unspecified"] pub seq1: SEQ, _reserved20: [u8; 0x10], #[doc = "0x560..0x570 - Unspecified"] pub psel: PSEL, } #[doc = "TASKS_STOP (w) register accessor: an alias for `Reg`"] pub type TASKS_STOP = crate::Reg; #[doc = "Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence playback"] pub mod tasks_stop; #[doc = "TASKS_SEQSTART (w) register accessor: an alias for `Reg`"] pub type TASKS_SEQSTART = crate::Reg; #[doc = "Description collection\\[n\\]: 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."] pub mod tasks_seqstart; #[doc = "TASKS_NEXTSTEP (w) register accessor: an alias for `Reg`"] pub type TASKS_NEXTSTEP = crate::Reg; #[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."] pub mod tasks_nextstep; #[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg`"] pub type EVENTS_STOPPED = crate::Reg; #[doc = "Response to STOP task, emitted when PWM pulses are no longer generated"] pub mod events_stopped; #[doc = "EVENTS_SEQSTARTED (rw) register accessor: an alias for `Reg`"] pub type EVENTS_SEQSTARTED = crate::Reg; #[doc = "Description collection\\[n\\]: First PWM period started on sequence n"] pub mod events_seqstarted; #[doc = "EVENTS_SEQEND (rw) register accessor: an alias for `Reg`"] pub type EVENTS_SEQEND = crate::Reg; #[doc = "Description collection\\[n\\]: Emitted at end of every sequence n, when last value from RAM has been applied to wave counter"] pub mod events_seqend; #[doc = "EVENTS_PWMPERIODEND (rw) register accessor: an alias for `Reg`"] pub type EVENTS_PWMPERIODEND = crate::Reg; #[doc = "Emitted at the end of each PWM period"] pub mod events_pwmperiodend; #[doc = "EVENTS_LOOPSDONE (rw) register accessor: an alias for `Reg`"] pub type EVENTS_LOOPSDONE = crate::Reg; #[doc = "Concatenated sequences have been played the amount of times defined in LOOP.CNT"] pub mod events_loopsdone; #[doc = "SHORTS (rw) register accessor: an alias for `Reg`"] pub type SHORTS = crate::Reg; #[doc = "Shortcut register"] pub mod shorts; #[doc = "INTEN (rw) register accessor: an alias for `Reg`"] pub type INTEN = crate::Reg; #[doc = "Enable or disable interrupt"] pub mod inten; #[doc = "INTENSET (rw) register accessor: an alias for `Reg`"] pub type INTENSET = crate::Reg; #[doc = "Enable interrupt"] pub mod intenset; #[doc = "INTENCLR (rw) register accessor: an alias for `Reg`"] pub type INTENCLR = crate::Reg; #[doc = "Disable interrupt"] pub mod intenclr; #[doc = "ENABLE (rw) register accessor: an alias for `Reg`"] pub type ENABLE = crate::Reg; #[doc = "PWM module enable register"] pub mod enable; #[doc = "MODE (rw) register accessor: an alias for `Reg`"] pub type MODE = crate::Reg; #[doc = "Selects operating mode of the wave counter"] pub mod mode; #[doc = "COUNTERTOP (rw) register accessor: an alias for `Reg`"] pub type COUNTERTOP = crate::Reg; #[doc = "Value up to which the pulse generator counter counts"] pub mod countertop; #[doc = "PRESCALER (rw) register accessor: an alias for `Reg`"] pub type PRESCALER = crate::Reg; #[doc = "Configuration for PWM_CLK"] pub mod prescaler; #[doc = "DECODER (rw) register accessor: an alias for `Reg`"] pub type DECODER = crate::Reg; #[doc = "Configuration of the decoder"] pub mod decoder; #[doc = "LOOP (rw) register accessor: an alias for `Reg`"] pub type LOOP = crate::Reg; #[doc = "Number of playbacks of a loop"] pub mod loop_; #[doc = "Unspecified"] pub use seq::SEQ; #[doc = r"Cluster"] #[doc = "Unspecified"] pub mod seq; #[doc = "Unspecified"] pub use psel::PSEL; #[doc = r"Cluster"] #[doc = "Unspecified"] pub mod psel;