1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Event Link Controller"]
28unsafe impl ::core::marker::Send for super::Elc {}
29unsafe impl ::core::marker::Sync for super::Elc {}
30impl super::Elc {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Event Link Controller Register"]
38 #[inline(always)]
39 pub const fn elcr(&self) -> &'static crate::common::Reg<self::Elcr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Elcr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Event Link Software Event Generation Register %s"]
48 #[inline(always)]
49 pub const fn elsegr(
50 &self,
51 ) -> &'static crate::common::ClusterRegisterArray<
52 crate::common::Reg<self::Elsegr_SPEC, crate::common::RW>,
53 2,
54 0x2,
55 > {
56 unsafe {
57 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
58 }
59 }
60 #[inline(always)]
61 pub const fn elsegr0(
62 &self,
63 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(0x2usize),
67 )
68 }
69 }
70 #[inline(always)]
71 pub const fn elsegr1(
72 &self,
73 ) -> &'static crate::common::Reg<self::Elsegr_SPEC, crate::common::RW> {
74 unsafe {
75 crate::common::Reg::<self::Elsegr_SPEC, crate::common::RW>::from_ptr(
76 self._svd2pac_as_ptr().add(0x4usize),
77 )
78 }
79 }
80
81 #[doc = "Event Link Setting Register 12"]
82 #[inline(always)]
83 pub const fn elsr12(
84 &self,
85 ) -> &'static crate::common::Reg<self::Elsr12_SPEC, crate::common::RW> {
86 unsafe {
87 crate::common::Reg::<self::Elsr12_SPEC, crate::common::RW>::from_ptr(
88 self._svd2pac_as_ptr().add(64usize),
89 )
90 }
91 }
92
93 #[doc = "Event Link Setting Register %s"]
94 #[inline(always)]
95 pub const fn elsr(
96 &self,
97 ) -> &'static crate::common::ClusterRegisterArray<
98 crate::common::Reg<self::Elsr_SPEC, crate::common::RW>,
99 2,
100 0x4,
101 > {
102 unsafe {
103 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x48usize))
104 }
105 }
106 #[inline(always)]
107 pub const fn elsr14(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
108 unsafe {
109 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
110 self._svd2pac_as_ptr().add(0x48usize),
111 )
112 }
113 }
114 #[inline(always)]
115 pub const fn elsr15(&self) -> &'static crate::common::Reg<self::Elsr_SPEC, crate::common::RW> {
116 unsafe {
117 crate::common::Reg::<self::Elsr_SPEC, crate::common::RW>::from_ptr(
118 self._svd2pac_as_ptr().add(0x4cusize),
119 )
120 }
121 }
122
123 #[doc = "Event Link Setting Register 18"]
124 #[inline(always)]
125 pub const fn elsr18(
126 &self,
127 ) -> &'static crate::common::Reg<self::Elsr18_SPEC, crate::common::RW> {
128 unsafe {
129 crate::common::Reg::<self::Elsr18_SPEC, crate::common::RW>::from_ptr(
130 self._svd2pac_as_ptr().add(88usize),
131 )
132 }
133 }
134}
135#[doc(hidden)]
136#[derive(Copy, Clone, Eq, PartialEq)]
137pub struct Elcr_SPEC;
138impl crate::sealed::RegSpec for Elcr_SPEC {
139 type DataType = u8;
140}
141
142#[doc = "Event Link Controller Register"]
143pub type Elcr = crate::RegValueT<Elcr_SPEC>;
144
145impl Elcr {
146 #[doc = "All Event Link Enable"]
147 #[inline(always)]
148 pub fn elcon(
149 self,
150 ) -> crate::common::RegisterField<
151 7,
152 0x1,
153 1,
154 0,
155 elcr::Elcon,
156 elcr::Elcon,
157 Elcr_SPEC,
158 crate::common::RW,
159 > {
160 crate::common::RegisterField::<
161 7,
162 0x1,
163 1,
164 0,
165 elcr::Elcon,
166 elcr::Elcon,
167 Elcr_SPEC,
168 crate::common::RW,
169 >::from_register(self, 0)
170 }
171}
172impl ::core::default::Default for Elcr {
173 #[inline(always)]
174 fn default() -> Elcr {
175 <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
176 }
177}
178pub mod elcr {
179
180 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
181 pub struct Elcon_SPEC;
182 pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
183 impl Elcon {
184 #[doc = "ELC function is disabled."]
185 pub const _0: Self = Self::new(0);
186
187 #[doc = "ELC function is enabled."]
188 pub const _1: Self = Self::new(1);
189 }
190}
191#[doc(hidden)]
192#[derive(Copy, Clone, Eq, PartialEq)]
193pub struct Elsegr_SPEC;
194impl crate::sealed::RegSpec for Elsegr_SPEC {
195 type DataType = u8;
196}
197
198#[doc = "Event Link Software Event Generation Register %s"]
199pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
200
201impl Elsegr {
202 #[doc = "Software Event Generation"]
203 #[inline(always)]
204 pub fn seg(
205 self,
206 ) -> crate::common::RegisterField<
207 0,
208 0x1,
209 1,
210 0,
211 elsegr::Seg,
212 elsegr::Seg,
213 Elsegr_SPEC,
214 crate::common::W,
215 > {
216 crate::common::RegisterField::<
217 0,
218 0x1,
219 1,
220 0,
221 elsegr::Seg,
222 elsegr::Seg,
223 Elsegr_SPEC,
224 crate::common::W,
225 >::from_register(self, 0)
226 }
227
228 #[doc = "SEG Bit Write Enable"]
229 #[inline(always)]
230 pub fn we(
231 self,
232 ) -> crate::common::RegisterField<
233 6,
234 0x1,
235 1,
236 0,
237 elsegr::We,
238 elsegr::We,
239 Elsegr_SPEC,
240 crate::common::RW,
241 > {
242 crate::common::RegisterField::<
243 6,
244 0x1,
245 1,
246 0,
247 elsegr::We,
248 elsegr::We,
249 Elsegr_SPEC,
250 crate::common::RW,
251 >::from_register(self, 0)
252 }
253
254 #[doc = "ELSEGR Register Write Disable"]
255 #[inline(always)]
256 pub fn wi(
257 self,
258 ) -> crate::common::RegisterField<
259 7,
260 0x1,
261 1,
262 0,
263 elsegr::Wi,
264 elsegr::Wi,
265 Elsegr_SPEC,
266 crate::common::W,
267 > {
268 crate::common::RegisterField::<
269 7,
270 0x1,
271 1,
272 0,
273 elsegr::Wi,
274 elsegr::Wi,
275 Elsegr_SPEC,
276 crate::common::W,
277 >::from_register(self, 0)
278 }
279}
280impl ::core::default::Default for Elsegr {
281 #[inline(always)]
282 fn default() -> Elsegr {
283 <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
284 }
285}
286pub mod elsegr {
287
288 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
289 pub struct Seg_SPEC;
290 pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
291 impl Seg {
292 #[doc = "Normal operation"]
293 pub const _0: Self = Self::new(0);
294
295 #[doc = "Software event is generated."]
296 pub const _1: Self = Self::new(1);
297 }
298 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
299 pub struct We_SPEC;
300 pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
301 impl We {
302 #[doc = "Write to SEG bit disabled."]
303 pub const _0: Self = Self::new(0);
304
305 #[doc = "Write to SEG bit enabled."]
306 pub const _1: Self = Self::new(1);
307 }
308 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
309 pub struct Wi_SPEC;
310 pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
311 impl Wi {
312 #[doc = "Write to ELSEGR register enabled."]
313 pub const _0: Self = Self::new(0);
314
315 #[doc = "Write to ELSEGR register disabled."]
316 pub const _1: Self = Self::new(1);
317 }
318}
319#[doc(hidden)]
320#[derive(Copy, Clone, Eq, PartialEq)]
321pub struct Elsr12_SPEC;
322impl crate::sealed::RegSpec for Elsr12_SPEC {
323 type DataType = u16;
324}
325
326#[doc = "Event Link Setting Register 12"]
327pub type Elsr12 = crate::RegValueT<Elsr12_SPEC>;
328
329impl Elsr12 {
330 #[doc = "Event Link Select"]
331 #[inline(always)]
332 pub fn els(
333 self,
334 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Elsr12_SPEC, crate::common::RW> {
335 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Elsr12_SPEC,crate::common::RW>::from_register(self,0)
336 }
337}
338impl ::core::default::Default for Elsr12 {
339 #[inline(always)]
340 fn default() -> Elsr12 {
341 <crate::RegValueT<Elsr12_SPEC> as RegisterValue<_>>::new(0)
342 }
343}
344
345#[doc(hidden)]
346#[derive(Copy, Clone, Eq, PartialEq)]
347pub struct Elsr_SPEC;
348impl crate::sealed::RegSpec for Elsr_SPEC {
349 type DataType = u16;
350}
351
352#[doc = "Event Link Setting Register %s"]
353pub type Elsr = crate::RegValueT<Elsr_SPEC>;
354
355impl Elsr {
356 #[doc = "Event Link Select"]
357 #[inline(always)]
358 pub fn els(
359 self,
360 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Elsr_SPEC, crate::common::RW> {
361 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Elsr_SPEC,crate::common::RW>::from_register(self,0)
362 }
363}
364impl ::core::default::Default for Elsr {
365 #[inline(always)]
366 fn default() -> Elsr {
367 <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
368 }
369}
370
371#[doc(hidden)]
372#[derive(Copy, Clone, Eq, PartialEq)]
373pub struct Elsr18_SPEC;
374impl crate::sealed::RegSpec for Elsr18_SPEC {
375 type DataType = u16;
376}
377
378#[doc = "Event Link Setting Register 18"]
379pub type Elsr18 = crate::RegValueT<Elsr18_SPEC>;
380
381impl Elsr18 {
382 #[doc = "Event Link Select"]
383 #[inline(always)]
384 pub fn els(
385 self,
386 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Elsr18_SPEC, crate::common::RW> {
387 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Elsr18_SPEC,crate::common::RW>::from_register(self,0)
388 }
389}
390impl ::core::default::Default for Elsr18 {
391 #[inline(always)]
392 fn default() -> Elsr18 {
393 <crate::RegValueT<Elsr18_SPEC> as RegisterValue<_>>::new(0)
394 }
395}