nrf5340_app_pac/
saadc_ns.rs1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Start the ADC and prepare the result buffer in RAM"]
5 pub tasks_start: TASKS_START,
6 #[doc = "0x04 - Take one ADC sample, if scan is enabled all channels are sampled"]
7 pub tasks_sample: TASKS_SAMPLE,
8 #[doc = "0x08 - Stop the ADC and terminate any ongoing conversion"]
9 pub tasks_stop: TASKS_STOP,
10 #[doc = "0x0c - Starts offset auto-calibration"]
11 pub tasks_calibrateoffset: TASKS_CALIBRATEOFFSET,
12 _reserved4: [u8; 0x70],
13 #[doc = "0x80 - Subscribe configuration for task START"]
14 pub subscribe_start: SUBSCRIBE_START,
15 #[doc = "0x84 - Subscribe configuration for task SAMPLE"]
16 pub subscribe_sample: SUBSCRIBE_SAMPLE,
17 #[doc = "0x88 - Subscribe configuration for task STOP"]
18 pub subscribe_stop: SUBSCRIBE_STOP,
19 #[doc = "0x8c - Subscribe configuration for task CALIBRATEOFFSET"]
20 pub subscribe_calibrateoffset: SUBSCRIBE_CALIBRATEOFFSET,
21 _reserved8: [u8; 0x70],
22 #[doc = "0x100 - The ADC has started"]
23 pub events_started: EVENTS_STARTED,
24 #[doc = "0x104 - The ADC has filled up the Result buffer"]
25 pub events_end: EVENTS_END,
26 #[doc = "0x108 - A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."]
27 pub events_done: EVENTS_DONE,
28 #[doc = "0x10c - A result is ready to get transferred to RAM"]
29 pub events_resultdone: EVENTS_RESULTDONE,
30 #[doc = "0x110 - Calibration is complete"]
31 pub events_calibratedone: EVENTS_CALIBRATEDONE,
32 #[doc = "0x114 - The ADC has stopped"]
33 pub events_stopped: EVENTS_STOPPED,
34 #[doc = "0x118..0x158 - Peripheral events."]
35 pub events_ch: [EVENTS_CH; 8],
36 _reserved15: [u8; 0x28],
37 #[doc = "0x180 - Publish configuration for event STARTED"]
38 pub publish_started: PUBLISH_STARTED,
39 #[doc = "0x184 - Publish configuration for event END"]
40 pub publish_end: PUBLISH_END,
41 #[doc = "0x188 - Publish configuration for event DONE"]
42 pub publish_done: PUBLISH_DONE,
43 #[doc = "0x18c - Publish configuration for event RESULTDONE"]
44 pub publish_resultdone: PUBLISH_RESULTDONE,
45 #[doc = "0x190 - Publish configuration for event CALIBRATEDONE"]
46 pub publish_calibratedone: PUBLISH_CALIBRATEDONE,
47 #[doc = "0x194 - Publish configuration for event STOPPED"]
48 pub publish_stopped: PUBLISH_STOPPED,
49 #[doc = "0x198..0x1d8 - Publish configuration for events"]
50 pub publish_ch: [PUBLISH_CH; 8],
51 _reserved22: [u8; 0x0128],
52 #[doc = "0x300 - Enable or disable interrupt"]
53 pub inten: INTEN,
54 #[doc = "0x304 - Enable interrupt"]
55 pub intenset: INTENSET,
56 #[doc = "0x308 - Disable interrupt"]
57 pub intenclr: INTENCLR,
58 _reserved25: [u8; 0xf4],
59 #[doc = "0x400 - Status"]
60 pub status: STATUS,
61 _reserved26: [u8; 0xfc],
62 #[doc = "0x500 - Enable or disable ADC"]
63 pub enable: ENABLE,
64 _reserved27: [u8; 0x0c],
65 #[doc = "0x510..0x590 - Unspecified"]
66 pub ch: [CH; 8],
67 _reserved28: [u8; 0x60],
68 #[doc = "0x5f0 - Resolution configuration"]
69 pub resolution: RESOLUTION,
70 #[doc = "0x5f4 - Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."]
71 pub oversample: OVERSAMPLE,
72 #[doc = "0x5f8 - Controls normal or continuous sample rate"]
73 pub samplerate: SAMPLERATE,
74 _reserved31: [u8; 0x30],
75 #[doc = "0x62c..0x638 - RESULT EasyDMA channel"]
76 pub result: RESULT,
77}
78#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
79pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
80#[doc = "Start the ADC and prepare the result buffer in RAM"]
81pub mod tasks_start;
82#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg<TASKS_SAMPLE_SPEC>`"]
83pub type TASKS_SAMPLE = crate::Reg<tasks_sample::TASKS_SAMPLE_SPEC>;
84#[doc = "Take one ADC sample, if scan is enabled all channels are sampled"]
85pub mod tasks_sample;
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 = "Stop the ADC and terminate any ongoing conversion"]
89pub mod tasks_stop;
90#[doc = "TASKS_CALIBRATEOFFSET (w) register accessor: an alias for `Reg<TASKS_CALIBRATEOFFSET_SPEC>`"]
91pub type TASKS_CALIBRATEOFFSET = crate::Reg<tasks_calibrateoffset::TASKS_CALIBRATEOFFSET_SPEC>;
92#[doc = "Starts offset auto-calibration"]
93pub mod tasks_calibrateoffset;
94#[doc = "SUBSCRIBE_START (rw) register accessor: an alias for `Reg<SUBSCRIBE_START_SPEC>`"]
95pub type SUBSCRIBE_START = crate::Reg<subscribe_start::SUBSCRIBE_START_SPEC>;
96#[doc = "Subscribe configuration for task START"]
97pub mod subscribe_start;
98#[doc = "SUBSCRIBE_SAMPLE (rw) register accessor: an alias for `Reg<SUBSCRIBE_SAMPLE_SPEC>`"]
99pub type SUBSCRIBE_SAMPLE = crate::Reg<subscribe_sample::SUBSCRIBE_SAMPLE_SPEC>;
100#[doc = "Subscribe configuration for task SAMPLE"]
101pub mod subscribe_sample;
102#[doc = "SUBSCRIBE_STOP (rw) register accessor: an alias for `Reg<SUBSCRIBE_STOP_SPEC>`"]
103pub type SUBSCRIBE_STOP = crate::Reg<subscribe_stop::SUBSCRIBE_STOP_SPEC>;
104#[doc = "Subscribe configuration for task STOP"]
105pub mod subscribe_stop;
106#[doc = "SUBSCRIBE_CALIBRATEOFFSET (rw) register accessor: an alias for `Reg<SUBSCRIBE_CALIBRATEOFFSET_SPEC>`"]
107pub type SUBSCRIBE_CALIBRATEOFFSET =
108 crate::Reg<subscribe_calibrateoffset::SUBSCRIBE_CALIBRATEOFFSET_SPEC>;
109#[doc = "Subscribe configuration for task CALIBRATEOFFSET"]
110pub mod subscribe_calibrateoffset;
111#[doc = "EVENTS_STARTED (rw) register accessor: an alias for `Reg<EVENTS_STARTED_SPEC>`"]
112pub type EVENTS_STARTED = crate::Reg<events_started::EVENTS_STARTED_SPEC>;
113#[doc = "The ADC has started"]
114pub mod events_started;
115#[doc = "EVENTS_END (rw) register accessor: an alias for `Reg<EVENTS_END_SPEC>`"]
116pub type EVENTS_END = crate::Reg<events_end::EVENTS_END_SPEC>;
117#[doc = "The ADC has filled up the Result buffer"]
118pub mod events_end;
119#[doc = "EVENTS_DONE (rw) register accessor: an alias for `Reg<EVENTS_DONE_SPEC>`"]
120pub type EVENTS_DONE = crate::Reg<events_done::EVENTS_DONE_SPEC>;
121#[doc = "A conversion task has been completed. Depending on the mode, multiple conversions might be needed for a result to be transferred to RAM."]
122pub mod events_done;
123#[doc = "EVENTS_RESULTDONE (rw) register accessor: an alias for `Reg<EVENTS_RESULTDONE_SPEC>`"]
124pub type EVENTS_RESULTDONE = crate::Reg<events_resultdone::EVENTS_RESULTDONE_SPEC>;
125#[doc = "A result is ready to get transferred to RAM"]
126pub mod events_resultdone;
127#[doc = "EVENTS_CALIBRATEDONE (rw) register accessor: an alias for `Reg<EVENTS_CALIBRATEDONE_SPEC>`"]
128pub type EVENTS_CALIBRATEDONE = crate::Reg<events_calibratedone::EVENTS_CALIBRATEDONE_SPEC>;
129#[doc = "Calibration is complete"]
130pub mod events_calibratedone;
131#[doc = "EVENTS_STOPPED (rw) register accessor: an alias for `Reg<EVENTS_STOPPED_SPEC>`"]
132pub type EVENTS_STOPPED = crate::Reg<events_stopped::EVENTS_STOPPED_SPEC>;
133#[doc = "The ADC has stopped"]
134pub mod events_stopped;
135#[doc = "Peripheral events."]
136pub use events_ch::EVENTS_CH;
137#[doc = r"Cluster"]
138#[doc = "Peripheral events."]
139pub mod events_ch;
140#[doc = "PUBLISH_STARTED (rw) register accessor: an alias for `Reg<PUBLISH_STARTED_SPEC>`"]
141pub type PUBLISH_STARTED = crate::Reg<publish_started::PUBLISH_STARTED_SPEC>;
142#[doc = "Publish configuration for event STARTED"]
143pub mod publish_started;
144#[doc = "PUBLISH_END (rw) register accessor: an alias for `Reg<PUBLISH_END_SPEC>`"]
145pub type PUBLISH_END = crate::Reg<publish_end::PUBLISH_END_SPEC>;
146#[doc = "Publish configuration for event END"]
147pub mod publish_end;
148#[doc = "PUBLISH_DONE (rw) register accessor: an alias for `Reg<PUBLISH_DONE_SPEC>`"]
149pub type PUBLISH_DONE = crate::Reg<publish_done::PUBLISH_DONE_SPEC>;
150#[doc = "Publish configuration for event DONE"]
151pub mod publish_done;
152#[doc = "PUBLISH_RESULTDONE (rw) register accessor: an alias for `Reg<PUBLISH_RESULTDONE_SPEC>`"]
153pub type PUBLISH_RESULTDONE = crate::Reg<publish_resultdone::PUBLISH_RESULTDONE_SPEC>;
154#[doc = "Publish configuration for event RESULTDONE"]
155pub mod publish_resultdone;
156#[doc = "PUBLISH_CALIBRATEDONE (rw) register accessor: an alias for `Reg<PUBLISH_CALIBRATEDONE_SPEC>`"]
157pub type PUBLISH_CALIBRATEDONE = crate::Reg<publish_calibratedone::PUBLISH_CALIBRATEDONE_SPEC>;
158#[doc = "Publish configuration for event CALIBRATEDONE"]
159pub mod publish_calibratedone;
160#[doc = "PUBLISH_STOPPED (rw) register accessor: an alias for `Reg<PUBLISH_STOPPED_SPEC>`"]
161pub type PUBLISH_STOPPED = crate::Reg<publish_stopped::PUBLISH_STOPPED_SPEC>;
162#[doc = "Publish configuration for event STOPPED"]
163pub mod publish_stopped;
164#[doc = "Publish configuration for events"]
165pub use publish_ch::PUBLISH_CH;
166#[doc = r"Cluster"]
167#[doc = "Publish configuration for events"]
168pub mod publish_ch;
169#[doc = "INTEN (rw) register accessor: an alias for `Reg<INTEN_SPEC>`"]
170pub type INTEN = crate::Reg<inten::INTEN_SPEC>;
171#[doc = "Enable or disable interrupt"]
172pub mod inten;
173#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
174pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
175#[doc = "Enable interrupt"]
176pub mod intenset;
177#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
178pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
179#[doc = "Disable interrupt"]
180pub mod intenclr;
181#[doc = "STATUS (r) register accessor: an alias for `Reg<STATUS_SPEC>`"]
182pub type STATUS = crate::Reg<status::STATUS_SPEC>;
183#[doc = "Status"]
184pub mod status;
185#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
186pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
187#[doc = "Enable or disable ADC"]
188pub mod enable;
189#[doc = "Unspecified"]
190pub use ch::CH;
191#[doc = r"Cluster"]
192#[doc = "Unspecified"]
193pub mod ch;
194#[doc = "RESOLUTION (rw) register accessor: an alias for `Reg<RESOLUTION_SPEC>`"]
195pub type RESOLUTION = crate::Reg<resolution::RESOLUTION_SPEC>;
196#[doc = "Resolution configuration"]
197pub mod resolution;
198#[doc = "OVERSAMPLE (rw) register accessor: an alias for `Reg<OVERSAMPLE_SPEC>`"]
199pub type OVERSAMPLE = crate::Reg<oversample::OVERSAMPLE_SPEC>;
200#[doc = "Oversampling configuration. OVERSAMPLE should not be combined with SCAN. The RESOLUTION is applied before averaging, thus for high OVERSAMPLE a higher RESOLUTION should be used."]
201pub mod oversample;
202#[doc = "SAMPLERATE (rw) register accessor: an alias for `Reg<SAMPLERATE_SPEC>`"]
203pub type SAMPLERATE = crate::Reg<samplerate::SAMPLERATE_SPEC>;
204#[doc = "Controls normal or continuous sample rate"]
205pub mod samplerate;
206#[doc = "RESULT EasyDMA channel"]
207pub use result::RESULT;
208#[doc = r"Cluster"]
209#[doc = "RESULT EasyDMA channel"]
210pub mod result;