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 #[doc = "Event Link Controller Register"]
37 #[inline(always)]
38 pub const fn elcr(&self) -> &'static crate::common::Reg<self::Elcr_SPEC, crate::common::RW> {
39 unsafe {
40 crate::common::Reg::<self::Elcr_SPEC, crate::common::RW>::from_ptr(
41 self._svd2pac_as_ptr().add(0usize),
42 )
43 }
44 }
45
46 #[doc = "Event Link Software Event Generation Register %s"]
47 #[inline(always)]
48 pub const fn elsegr(
49 &self,
50 ) -> &'static crate::common::ClusterRegisterArray<
51 crate::common::Reg<self::Elsegr_SPEC, crate::common::RW>,
52 2,
53 0x2,
54 > {
55 unsafe {
56 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
57 }
58 }
59
60 #[doc = "Event Link Setting Register %s"]
61 #[inline(always)]
62 pub const fn elsr(
63 &self,
64 ) -> &'static crate::common::ClusterRegisterArray<
65 crate::common::Reg<self::Elsr_SPEC, crate::common::RW>,
66 6,
67 0x4,
68 > {
69 unsafe {
70 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x40usize))
71 }
72 }
73
74 #[doc = "Event Link Setting Register 23"]
75 #[inline(always)]
76 pub const fn elsr23(
77 &self,
78 ) -> &'static crate::common::Reg<self::Elsr23_SPEC, crate::common::RW> {
79 unsafe {
80 crate::common::Reg::<self::Elsr23_SPEC, crate::common::RW>::from_ptr(
81 self._svd2pac_as_ptr().add(108usize),
82 )
83 }
84 }
85
86 #[doc = "Event Link Controller Security Attribution Register A"]
87 #[inline(always)]
88 pub const fn elcsara(
89 &self,
90 ) -> &'static crate::common::Reg<self::Elcsara_SPEC, crate::common::RW> {
91 unsafe {
92 crate::common::Reg::<self::Elcsara_SPEC, crate::common::RW>::from_ptr(
93 self._svd2pac_as_ptr().add(116usize),
94 )
95 }
96 }
97
98 #[doc = "Event Link Controller Security Attribution Register B"]
99 #[inline(always)]
100 pub const fn elcsarb(
101 &self,
102 ) -> &'static crate::common::Reg<self::Elcsarb_SPEC, crate::common::RW> {
103 unsafe {
104 crate::common::Reg::<self::Elcsarb_SPEC, crate::common::RW>::from_ptr(
105 self._svd2pac_as_ptr().add(120usize),
106 )
107 }
108 }
109
110 #[doc = "Event Link Controller Security Attribution Register C"]
111 #[inline(always)]
112 pub const fn elcsarc(
113 &self,
114 ) -> &'static crate::common::Reg<self::Elcsarc_SPEC, crate::common::RW> {
115 unsafe {
116 crate::common::Reg::<self::Elcsarc_SPEC, crate::common::RW>::from_ptr(
117 self._svd2pac_as_ptr().add(124usize),
118 )
119 }
120 }
121}
122#[doc(hidden)]
123#[derive(Copy, Clone, Eq, PartialEq)]
124pub struct Elcr_SPEC;
125impl crate::sealed::RegSpec for Elcr_SPEC {
126 type DataType = u8;
127}
128#[doc = "Event Link Controller Register"]
129pub type Elcr = crate::RegValueT<Elcr_SPEC>;
130
131impl Elcr {
132 #[doc = "All Event Link Enable"]
133 #[inline(always)]
134 pub fn elcon(
135 self,
136 ) -> crate::common::RegisterField<7, 0x1, 1, 0, elcr::Elcon, Elcr_SPEC, crate::common::RW> {
137 crate::common::RegisterField::<7,0x1,1,0,elcr::Elcon, Elcr_SPEC,crate::common::RW>::from_register(self,0)
138 }
139}
140impl ::core::default::Default for Elcr {
141 #[inline(always)]
142 fn default() -> Elcr {
143 <crate::RegValueT<Elcr_SPEC> as RegisterValue<_>>::new(0)
144 }
145}
146pub mod elcr {
147
148 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
149 pub struct Elcon_SPEC;
150 pub type Elcon = crate::EnumBitfieldStruct<u8, Elcon_SPEC>;
151 impl Elcon {
152 #[doc = "ELC function is disabled."]
153 pub const _0: Self = Self::new(0);
154 #[doc = "ELC function is enabled."]
155 pub const _1: Self = Self::new(1);
156 }
157}
158#[doc(hidden)]
159#[derive(Copy, Clone, Eq, PartialEq)]
160pub struct Elsegr_SPEC;
161impl crate::sealed::RegSpec for Elsegr_SPEC {
162 type DataType = u8;
163}
164#[doc = "Event Link Software Event Generation Register %s"]
165pub type Elsegr = crate::RegValueT<Elsegr_SPEC>;
166
167impl Elsegr {
168 #[doc = "Software Event Generation"]
169 #[inline(always)]
170 pub fn seg(
171 self,
172 ) -> crate::common::RegisterField<0, 0x1, 1, 0, elsegr::Seg, Elsegr_SPEC, crate::common::W>
173 {
174 crate::common::RegisterField::<0,0x1,1,0,elsegr::Seg, Elsegr_SPEC,crate::common::W>::from_register(self,0)
175 }
176 #[doc = "SEG Bit Write Enable"]
177 #[inline(always)]
178 pub fn we(
179 self,
180 ) -> crate::common::RegisterField<6, 0x1, 1, 0, elsegr::We, Elsegr_SPEC, crate::common::RW>
181 {
182 crate::common::RegisterField::<6,0x1,1,0,elsegr::We, Elsegr_SPEC,crate::common::RW>::from_register(self,0)
183 }
184 #[doc = "ELSEGR Register Write Disable"]
185 #[inline(always)]
186 pub fn wi(
187 self,
188 ) -> crate::common::RegisterField<7, 0x1, 1, 0, elsegr::Wi, Elsegr_SPEC, crate::common::W> {
189 crate::common::RegisterField::<7,0x1,1,0,elsegr::Wi, Elsegr_SPEC,crate::common::W>::from_register(self,0)
190 }
191}
192impl ::core::default::Default for Elsegr {
193 #[inline(always)]
194 fn default() -> Elsegr {
195 <crate::RegValueT<Elsegr_SPEC> as RegisterValue<_>>::new(128)
196 }
197}
198pub mod elsegr {
199
200 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
201 pub struct Seg_SPEC;
202 pub type Seg = crate::EnumBitfieldStruct<u8, Seg_SPEC>;
203 impl Seg {
204 #[doc = "Normal operation"]
205 pub const _0: Self = Self::new(0);
206 #[doc = "Software event is generated."]
207 pub const _1: Self = Self::new(1);
208 }
209 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
210 pub struct We_SPEC;
211 pub type We = crate::EnumBitfieldStruct<u8, We_SPEC>;
212 impl We {
213 #[doc = "Write to SEG bit disabled."]
214 pub const _0: Self = Self::new(0);
215 #[doc = "Write to SEG bit enabled."]
216 pub const _1: Self = Self::new(1);
217 }
218 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
219 pub struct Wi_SPEC;
220 pub type Wi = crate::EnumBitfieldStruct<u8, Wi_SPEC>;
221 impl Wi {
222 #[doc = "Write to ELSEGR register enabled."]
223 pub const _0: Self = Self::new(0);
224 #[doc = "Write to ELSEGR register disabled."]
225 pub const _1: Self = Self::new(1);
226 }
227}
228#[doc(hidden)]
229#[derive(Copy, Clone, Eq, PartialEq)]
230pub struct Elsr_SPEC;
231impl crate::sealed::RegSpec for Elsr_SPEC {
232 type DataType = u16;
233}
234#[doc = "Event Link Setting Register %s"]
235pub type Elsr = crate::RegValueT<Elsr_SPEC>;
236
237impl Elsr {
238 #[doc = "Event Link Select"]
239 #[inline(always)]
240 pub fn els(
241 self,
242 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, Elsr_SPEC, crate::common::RW> {
243 crate::common::RegisterField::<0,0x1ff,1,0,u16, Elsr_SPEC,crate::common::RW>::from_register(self,0)
244 }
245}
246impl ::core::default::Default for Elsr {
247 #[inline(always)]
248 fn default() -> Elsr {
249 <crate::RegValueT<Elsr_SPEC> as RegisterValue<_>>::new(0)
250 }
251}
252
253#[doc(hidden)]
254#[derive(Copy, Clone, Eq, PartialEq)]
255pub struct Elsr23_SPEC;
256impl crate::sealed::RegSpec for Elsr23_SPEC {
257 type DataType = u16;
258}
259#[doc = "Event Link Setting Register 23"]
260pub type Elsr23 = crate::RegValueT<Elsr23_SPEC>;
261
262impl Elsr23 {
263 #[doc = "Event Link Select"]
264 #[inline(always)]
265 pub fn els(
266 self,
267 ) -> crate::common::RegisterField<0, 0x1ff, 1, 0, u16, Elsr23_SPEC, crate::common::RW> {
268 crate::common::RegisterField::<0,0x1ff,1,0,u16, Elsr23_SPEC,crate::common::RW>::from_register(self,0)
269 }
270}
271impl ::core::default::Default for Elsr23 {
272 #[inline(always)]
273 fn default() -> Elsr23 {
274 <crate::RegValueT<Elsr23_SPEC> as RegisterValue<_>>::new(0)
275 }
276}
277
278#[doc(hidden)]
279#[derive(Copy, Clone, Eq, PartialEq)]
280pub struct Elcsara_SPEC;
281impl crate::sealed::RegSpec for Elcsara_SPEC {
282 type DataType = u16;
283}
284#[doc = "Event Link Controller Security Attribution Register A"]
285pub type Elcsara = crate::RegValueT<Elcsara_SPEC>;
286
287impl Elcsara {
288 #[doc = "Event Link Controller Register Security Attribution"]
289 #[inline(always)]
290 pub fn elcr(
291 self,
292 ) -> crate::common::RegisterField<0, 0x1, 1, 0, elcsara::Elcr, Elcsara_SPEC, crate::common::RW>
293 {
294 crate::common::RegisterField::<0,0x1,1,0,elcsara::Elcr, Elcsara_SPEC,crate::common::RW>::from_register(self,0)
295 }
296 #[doc = "Event Link Software Event Generation Register 0 Security Attribution"]
297 #[inline(always)]
298 pub fn elsegr0(
299 self,
300 ) -> crate::common::RegisterField<1, 0x1, 1, 0, elcsara::Elsegr0, Elcsara_SPEC, crate::common::RW>
301 {
302 crate::common::RegisterField::<
303 1,
304 0x1,
305 1,
306 0,
307 elcsara::Elsegr0,
308 Elcsara_SPEC,
309 crate::common::RW,
310 >::from_register(self, 0)
311 }
312 #[doc = "Event Link Software Event Generation Register 1 Security Attribution"]
313 #[inline(always)]
314 pub fn elsegr1(
315 self,
316 ) -> crate::common::RegisterField<2, 0x1, 1, 0, elcsara::Elsegr1, Elcsara_SPEC, crate::common::RW>
317 {
318 crate::common::RegisterField::<
319 2,
320 0x1,
321 1,
322 0,
323 elcsara::Elsegr1,
324 Elcsara_SPEC,
325 crate::common::RW,
326 >::from_register(self, 0)
327 }
328}
329impl ::core::default::Default for Elcsara {
330 #[inline(always)]
331 fn default() -> Elcsara {
332 <crate::RegValueT<Elcsara_SPEC> as RegisterValue<_>>::new(65535)
333 }
334}
335pub mod elcsara {
336
337 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
338 pub struct Elcr_SPEC;
339 pub type Elcr = crate::EnumBitfieldStruct<u8, Elcr_SPEC>;
340 impl Elcr {
341 #[doc = "Secure"]
342 pub const _0: Self = Self::new(0);
343 #[doc = "Non-secure"]
344 pub const _1: Self = Self::new(1);
345 }
346 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
347 pub struct Elsegr0_SPEC;
348 pub type Elsegr0 = crate::EnumBitfieldStruct<u8, Elsegr0_SPEC>;
349 impl Elsegr0 {
350 #[doc = "Secure"]
351 pub const _0: Self = Self::new(0);
352 #[doc = "Non-secure"]
353 pub const _1: Self = Self::new(1);
354 }
355 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
356 pub struct Elsegr1_SPEC;
357 pub type Elsegr1 = crate::EnumBitfieldStruct<u8, Elsegr1_SPEC>;
358 impl Elsegr1 {
359 #[doc = "Secure"]
360 pub const _0: Self = Self::new(0);
361 #[doc = "Non-secure"]
362 pub const _1: Self = Self::new(1);
363 }
364}
365#[doc(hidden)]
366#[derive(Copy, Clone, Eq, PartialEq)]
367pub struct Elcsarb_SPEC;
368impl crate::sealed::RegSpec for Elcsarb_SPEC {
369 type DataType = u16;
370}
371#[doc = "Event Link Controller Security Attribution Register B"]
372pub type Elcsarb = crate::RegValueT<Elcsarb_SPEC>;
373
374impl Elcsarb {
375 #[doc = "Event Link Setting Register n Security Attribution"]
376 #[inline(always)]
377 pub fn elsr(
378 self,
379 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, elcsarb::Elsr, Elcsarb_SPEC, crate::common::RW>
380 {
381 crate::common::RegisterField::<
382 0,
383 0xffff,
384 1,
385 0,
386 elcsarb::Elsr,
387 Elcsarb_SPEC,
388 crate::common::RW,
389 >::from_register(self, 0)
390 }
391}
392impl ::core::default::Default for Elcsarb {
393 #[inline(always)]
394 fn default() -> Elcsarb {
395 <crate::RegValueT<Elcsarb_SPEC> as RegisterValue<_>>::new(65535)
396 }
397}
398pub mod elcsarb {
399
400 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
401 pub struct Elsr_SPEC;
402 pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
403 impl Elsr {
404 #[doc = "Secure"]
405 pub const _0: Self = Self::new(0);
406 #[doc = "Non-secure"]
407 pub const _1: Self = Self::new(1);
408 }
409}
410#[doc(hidden)]
411#[derive(Copy, Clone, Eq, PartialEq)]
412pub struct Elcsarc_SPEC;
413impl crate::sealed::RegSpec for Elcsarc_SPEC {
414 type DataType = u16;
415}
416#[doc = "Event Link Controller Security Attribution Register C"]
417pub type Elcsarc = crate::RegValueT<Elcsarc_SPEC>;
418
419impl Elcsarc {
420 #[doc = "Event Link Setting Register n Security Attribution (n = 16 to 23)"]
421 #[inline(always)]
422 pub fn elsr(
423 self,
424 ) -> crate::common::RegisterField<0, 0xff, 1, 0, elcsarc::Elsr, Elcsarc_SPEC, crate::common::RW>
425 {
426 crate::common::RegisterField::<0,0xff,1,0,elcsarc::Elsr, Elcsarc_SPEC,crate::common::RW>::from_register(self,0)
427 }
428}
429impl ::core::default::Default for Elcsarc {
430 #[inline(always)]
431 fn default() -> Elcsarc {
432 <crate::RegValueT<Elcsarc_SPEC> as RegisterValue<_>>::new(65535)
433 }
434}
435pub mod elcsarc {
436
437 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
438 pub struct Elsr_SPEC;
439 pub type Elsr = crate::EnumBitfieldStruct<u8, Elsr_SPEC>;
440 impl Elsr {
441 #[doc = "Secure"]
442 pub const _0: Self = Self::new(0);
443 #[doc = "Non-secure"]
444 pub const _1: Self = Self::new(1);
445 }
446}