nrf52840_pac/
pdm.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    #[doc = "0x00 - Starts continuous PDM transfer"]
5    pub tasks_start: TASKS_START,
6    #[doc = "0x04 - Stops PDM transfer"]
7    pub tasks_stop: TASKS_STOP,
8    _reserved2: [u8; 0xf8],
9    #[doc = "0x100 - PDM transfer has started"]
10    pub events_started: EVENTS_STARTED,
11    #[doc = "0x104 - PDM transfer has finished"]
12    pub events_stopped: EVENTS_STOPPED,
13    #[doc = "0x108 - The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"]
14    pub events_end: EVENTS_END,
15    _reserved5: [u8; 0x01f4],
16    #[doc = "0x300 - Enable or disable interrupt"]
17    pub inten: INTEN,
18    #[doc = "0x304 - Enable interrupt"]
19    pub intenset: INTENSET,
20    #[doc = "0x308 - Disable interrupt"]
21    pub intenclr: INTENCLR,
22    _reserved8: [u8; 0x01f4],
23    #[doc = "0x500 - PDM module enable register"]
24    pub enable: ENABLE,
25    #[doc = "0x504 - PDM clock generator control"]
26    pub pdmclkctrl: PDMCLKCTRL,
27    #[doc = "0x508 - Defines the routing of the connected PDM microphones' signals"]
28    pub mode: MODE,
29    _reserved11: [u8; 0x0c],
30    #[doc = "0x518 - Left output gain adjustment"]
31    pub gainl: GAINL,
32    #[doc = "0x51c - Right output gain adjustment"]
33    pub gainr: GAINR,
34    #[doc = "0x520 - Selects the ratio between PDM_CLK and output sample rate. Change PDMCLKCTRL accordingly."]
35    pub ratio: RATIO,
36    _reserved14: [u8; 0x1c],
37    #[doc = "0x540..0x548 - Unspecified"]
38    pub psel: PSEL,
39    _reserved15: [u8; 0x18],
40    #[doc = "0x560..0x568 - Unspecified"]
41    pub sample: SAMPLE,
42}
43#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
44pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
45#[doc = "Starts continuous PDM transfer"]
46pub mod tasks_start;
47#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
48pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
49#[doc = "Stops PDM transfer"]
50pub mod tasks_stop;
51#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg<EVENTS_STARTED_SPEC>`"]
52pub type EVENTS_STARTED = crate::Reg<events_started::EVENTS_STARTED_SPEC>;
53#[doc = "PDM transfer has started"]
54pub mod events_started;
55#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
56pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
57#[doc = "PDM transfer has finished"]
58pub mod events_stopped;
59#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
60pub type EVENTS_END = crate::Reg<events_end::EVENTS_END_SPEC>;
61#[doc = "The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM"]
62pub mod events_end;
63#[doc = "INTEN (rw) register accessor: an alias for `Reg<INTEN_SPEC>`"]
64pub type INTEN = crate::Reg<inten::INTEN_SPEC>;
65#[doc = "Enable or disable interrupt"]
66pub mod inten;
67#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
68pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
69#[doc = "Enable interrupt"]
70pub mod intenset;
71#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
72pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
73#[doc = "Disable interrupt"]
74pub mod intenclr;
75#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
76pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
77#[doc = "PDM module enable register"]
78pub mod enable;
79#[doc = "PDMCLKCTRL (rw) register accessor: an alias for `Reg<PDMCLKCTRL_SPEC>`"]
80pub type PDMCLKCTRL = crate::Reg<pdmclkctrl::PDMCLKCTRL_SPEC>;
81#[doc = "PDM clock generator control"]
82pub mod pdmclkctrl;
83#[doc = "MODE (rw) register accessor: an alias for `Reg<MODE_SPEC>`"]
84pub type MODE = crate::Reg<mode::MODE_SPEC>;
85#[doc = "Defines the routing of the connected PDM microphones' signals"]
86pub mod mode;
87#[doc = "GAINL (rw) register accessor: an alias for `Reg<GAINL_SPEC>`"]
88pub type GAINL = crate::Reg<gainl::GAINL_SPEC>;
89#[doc = "Left output gain adjustment"]
90pub mod gainl;
91#[doc = "GAINR (rw) register accessor: an alias for `Reg<GAINR_SPEC>`"]
92pub type GAINR = crate::Reg<gainr::GAINR_SPEC>;
93#[doc = "Right output gain adjustment"]
94pub mod gainr;
95#[doc = "RATIO (rw) register accessor: an alias for `Reg<RATIO_SPEC>`"]
96pub type RATIO = crate::Reg<ratio::RATIO_SPEC>;
97#[doc = "Selects the ratio between PDM_CLK and output sample rate. Change PDMCLKCTRL accordingly."]
98pub mod ratio;
99#[doc = "Unspecified"]
100pub use psel::PSEL;
101#[doc = r"Cluster"]
102#[doc = "Unspecified"]
103pub mod psel;
104#[doc = "Unspecified"]
105pub use sample::SAMPLE;
106#[doc = r"Cluster"]
107#[doc = "Unspecified"]
108pub mod sample;