1pub type R = crate::R<SRrs>;
3pub type W = crate::W<SRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum EOPR {
11 Inactive = 0,
13 Active = 1,
15}
16impl From<EOPR> for bool {
17 #[inline(always)]
18 fn from(variant: EOPR) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type EOP_R = crate::BitReader<EOPR>;
24impl EOP_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> EOPR {
28 match self.bits {
29 false => EOPR::Inactive,
30 true => EOPR::Active,
31 }
32 }
33 #[inline(always)]
35 pub fn is_inactive(&self) -> bool {
36 *self == EOPR::Inactive
37 }
38 #[inline(always)]
40 pub fn is_active(&self) -> bool {
41 *self == EOPR::Active
42 }
43}
44#[cfg_attr(feature = "defmt", derive(defmt::Format))]
48#[derive(Clone, Copy, Debug, PartialEq, Eq)]
49pub enum EOPW {
50 Clear = 1,
52}
53impl From<EOPW> for bool {
54 #[inline(always)]
55 fn from(variant: EOPW) -> Self {
56 variant as u8 != 0
57 }
58}
59pub type EOP_W<'a, REG> = crate::BitWriter1C<'a, REG, EOPW>;
61impl<'a, REG> EOP_W<'a, REG>
62where
63 REG: crate::Writable + crate::RegisterSpec,
64{
65 #[inline(always)]
67 pub fn clear(self) -> &'a mut crate::W<REG> {
68 self.variant(EOPW::Clear)
69 }
70}
71#[cfg_attr(feature = "defmt", derive(defmt::Format))]
75#[derive(Clone, Copy, Debug, PartialEq, Eq)]
76pub enum OPERRR {
77 Inactive = 0,
79 Active = 1,
81}
82impl From<OPERRR> for bool {
83 #[inline(always)]
84 fn from(variant: OPERRR) -> Self {
85 variant as u8 != 0
86 }
87}
88pub type OPERR_R = crate::BitReader<OPERRR>;
90impl OPERR_R {
91 #[inline(always)]
93 pub const fn variant(&self) -> OPERRR {
94 match self.bits {
95 false => OPERRR::Inactive,
96 true => OPERRR::Active,
97 }
98 }
99 #[inline(always)]
101 pub fn is_inactive(&self) -> bool {
102 *self == OPERRR::Inactive
103 }
104 #[inline(always)]
106 pub fn is_active(&self) -> bool {
107 *self == OPERRR::Active
108 }
109}
110#[cfg_attr(feature = "defmt", derive(defmt::Format))]
114#[derive(Clone, Copy, Debug, PartialEq, Eq)]
115pub enum OPERRW {
116 Clear = 1,
118}
119impl From<OPERRW> for bool {
120 #[inline(always)]
121 fn from(variant: OPERRW) -> Self {
122 variant as u8 != 0
123 }
124}
125pub type OPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, OPERRW>;
127impl<'a, REG> OPERR_W<'a, REG>
128where
129 REG: crate::Writable + crate::RegisterSpec,
130{
131 #[inline(always)]
133 pub fn clear(self) -> &'a mut crate::W<REG> {
134 self.variant(OPERRW::Clear)
135 }
136}
137#[cfg_attr(feature = "defmt", derive(defmt::Format))]
141#[derive(Clone, Copy, Debug, PartialEq, Eq)]
142pub enum WRPERRR {
143 Inactive = 0,
145 Active = 1,
147}
148impl From<WRPERRR> for bool {
149 #[inline(always)]
150 fn from(variant: WRPERRR) -> Self {
151 variant as u8 != 0
152 }
153}
154pub type WRPERR_R = crate::BitReader<WRPERRR>;
156impl WRPERR_R {
157 #[inline(always)]
159 pub const fn variant(&self) -> WRPERRR {
160 match self.bits {
161 false => WRPERRR::Inactive,
162 true => WRPERRR::Active,
163 }
164 }
165 #[inline(always)]
167 pub fn is_inactive(&self) -> bool {
168 *self == WRPERRR::Inactive
169 }
170 #[inline(always)]
172 pub fn is_active(&self) -> bool {
173 *self == WRPERRR::Active
174 }
175}
176#[cfg_attr(feature = "defmt", derive(defmt::Format))]
180#[derive(Clone, Copy, Debug, PartialEq, Eq)]
181pub enum WRPERRW {
182 Clear = 1,
184}
185impl From<WRPERRW> for bool {
186 #[inline(always)]
187 fn from(variant: WRPERRW) -> Self {
188 variant as u8 != 0
189 }
190}
191pub type WRPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, WRPERRW>;
193impl<'a, REG> WRPERR_W<'a, REG>
194where
195 REG: crate::Writable + crate::RegisterSpec,
196{
197 #[inline(always)]
199 pub fn clear(self) -> &'a mut crate::W<REG> {
200 self.variant(WRPERRW::Clear)
201 }
202}
203#[cfg_attr(feature = "defmt", derive(defmt::Format))]
207#[derive(Clone, Copy, Debug, PartialEq, Eq)]
208pub enum PGAERRR {
209 Inactive = 0,
211 Active = 1,
213}
214impl From<PGAERRR> for bool {
215 #[inline(always)]
216 fn from(variant: PGAERRR) -> Self {
217 variant as u8 != 0
218 }
219}
220pub type PGAERR_R = crate::BitReader<PGAERRR>;
222impl PGAERR_R {
223 #[inline(always)]
225 pub const fn variant(&self) -> PGAERRR {
226 match self.bits {
227 false => PGAERRR::Inactive,
228 true => PGAERRR::Active,
229 }
230 }
231 #[inline(always)]
233 pub fn is_inactive(&self) -> bool {
234 *self == PGAERRR::Inactive
235 }
236 #[inline(always)]
238 pub fn is_active(&self) -> bool {
239 *self == PGAERRR::Active
240 }
241}
242#[cfg_attr(feature = "defmt", derive(defmt::Format))]
246#[derive(Clone, Copy, Debug, PartialEq, Eq)]
247pub enum PGAERRW {
248 Clear = 1,
250}
251impl From<PGAERRW> for bool {
252 #[inline(always)]
253 fn from(variant: PGAERRW) -> Self {
254 variant as u8 != 0
255 }
256}
257pub type PGAERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGAERRW>;
259impl<'a, REG> PGAERR_W<'a, REG>
260where
261 REG: crate::Writable + crate::RegisterSpec,
262{
263 #[inline(always)]
265 pub fn clear(self) -> &'a mut crate::W<REG> {
266 self.variant(PGAERRW::Clear)
267 }
268}
269#[cfg_attr(feature = "defmt", derive(defmt::Format))]
273#[derive(Clone, Copy, Debug, PartialEq, Eq)]
274pub enum PGPERRR {
275 Inactive = 0,
277 Active = 1,
279}
280impl From<PGPERRR> for bool {
281 #[inline(always)]
282 fn from(variant: PGPERRR) -> Self {
283 variant as u8 != 0
284 }
285}
286pub type PGPERR_R = crate::BitReader<PGPERRR>;
288impl PGPERR_R {
289 #[inline(always)]
291 pub const fn variant(&self) -> PGPERRR {
292 match self.bits {
293 false => PGPERRR::Inactive,
294 true => PGPERRR::Active,
295 }
296 }
297 #[inline(always)]
299 pub fn is_inactive(&self) -> bool {
300 *self == PGPERRR::Inactive
301 }
302 #[inline(always)]
304 pub fn is_active(&self) -> bool {
305 *self == PGPERRR::Active
306 }
307}
308#[cfg_attr(feature = "defmt", derive(defmt::Format))]
312#[derive(Clone, Copy, Debug, PartialEq, Eq)]
313pub enum PGPERRW {
314 Clear = 1,
316}
317impl From<PGPERRW> for bool {
318 #[inline(always)]
319 fn from(variant: PGPERRW) -> Self {
320 variant as u8 != 0
321 }
322}
323pub type PGPERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGPERRW>;
325impl<'a, REG> PGPERR_W<'a, REG>
326where
327 REG: crate::Writable + crate::RegisterSpec,
328{
329 #[inline(always)]
331 pub fn clear(self) -> &'a mut crate::W<REG> {
332 self.variant(PGPERRW::Clear)
333 }
334}
335#[cfg_attr(feature = "defmt", derive(defmt::Format))]
339#[derive(Clone, Copy, Debug, PartialEq, Eq)]
340pub enum PGSERRR {
341 Inactive = 0,
343 Active = 1,
345}
346impl From<PGSERRR> for bool {
347 #[inline(always)]
348 fn from(variant: PGSERRR) -> Self {
349 variant as u8 != 0
350 }
351}
352pub type PGSERR_R = crate::BitReader<PGSERRR>;
354impl PGSERR_R {
355 #[inline(always)]
357 pub const fn variant(&self) -> PGSERRR {
358 match self.bits {
359 false => PGSERRR::Inactive,
360 true => PGSERRR::Active,
361 }
362 }
363 #[inline(always)]
365 pub fn is_inactive(&self) -> bool {
366 *self == PGSERRR::Inactive
367 }
368 #[inline(always)]
370 pub fn is_active(&self) -> bool {
371 *self == PGSERRR::Active
372 }
373}
374#[cfg_attr(feature = "defmt", derive(defmt::Format))]
378#[derive(Clone, Copy, Debug, PartialEq, Eq)]
379pub enum PGSERRW {
380 Clear = 1,
382}
383impl From<PGSERRW> for bool {
384 #[inline(always)]
385 fn from(variant: PGSERRW) -> Self {
386 variant as u8 != 0
387 }
388}
389pub type PGSERR_W<'a, REG> = crate::BitWriter1C<'a, REG, PGSERRW>;
391impl<'a, REG> PGSERR_W<'a, REG>
392where
393 REG: crate::Writable + crate::RegisterSpec,
394{
395 #[inline(always)]
397 pub fn clear(self) -> &'a mut crate::W<REG> {
398 self.variant(PGSERRW::Clear)
399 }
400}
401#[cfg_attr(feature = "defmt", derive(defmt::Format))]
405#[derive(Clone, Copy, Debug, PartialEq, Eq)]
406pub enum RDERRR {
407 Inactive = 0,
409 Active = 1,
411}
412impl From<RDERRR> for bool {
413 #[inline(always)]
414 fn from(variant: RDERRR) -> Self {
415 variant as u8 != 0
416 }
417}
418pub type RDERR_R = crate::BitReader<RDERRR>;
420impl RDERR_R {
421 #[inline(always)]
423 pub const fn variant(&self) -> RDERRR {
424 match self.bits {
425 false => RDERRR::Inactive,
426 true => RDERRR::Active,
427 }
428 }
429 #[inline(always)]
431 pub fn is_inactive(&self) -> bool {
432 *self == RDERRR::Inactive
433 }
434 #[inline(always)]
436 pub fn is_active(&self) -> bool {
437 *self == RDERRR::Active
438 }
439}
440#[cfg_attr(feature = "defmt", derive(defmt::Format))]
444#[derive(Clone, Copy, Debug, PartialEq, Eq)]
445pub enum RDERRW {
446 Clear = 1,
448}
449impl From<RDERRW> for bool {
450 #[inline(always)]
451 fn from(variant: RDERRW) -> Self {
452 variant as u8 != 0
453 }
454}
455pub type RDERR_W<'a, REG> = crate::BitWriter1C<'a, REG, RDERRW>;
457impl<'a, REG> RDERR_W<'a, REG>
458where
459 REG: crate::Writable + crate::RegisterSpec,
460{
461 #[inline(always)]
463 pub fn clear(self) -> &'a mut crate::W<REG> {
464 self.variant(RDERRW::Clear)
465 }
466}
467#[cfg_attr(feature = "defmt", derive(defmt::Format))]
471#[derive(Clone, Copy, Debug, PartialEq, Eq)]
472pub enum BSYR {
473 NotBusy = 0,
475 Busy = 1,
477}
478impl From<BSYR> for bool {
479 #[inline(always)]
480 fn from(variant: BSYR) -> Self {
481 variant as u8 != 0
482 }
483}
484pub type BSY_R = crate::BitReader<BSYR>;
486impl BSY_R {
487 #[inline(always)]
489 pub const fn variant(&self) -> BSYR {
490 match self.bits {
491 false => BSYR::NotBusy,
492 true => BSYR::Busy,
493 }
494 }
495 #[inline(always)]
497 pub fn is_not_busy(&self) -> bool {
498 *self == BSYR::NotBusy
499 }
500 #[inline(always)]
502 pub fn is_busy(&self) -> bool {
503 *self == BSYR::Busy
504 }
505}
506impl R {
507 #[inline(always)]
509 pub fn eop(&self) -> EOP_R {
510 EOP_R::new((self.bits & 1) != 0)
511 }
512 #[inline(always)]
514 pub fn operr(&self) -> OPERR_R {
515 OPERR_R::new(((self.bits >> 1) & 1) != 0)
516 }
517 #[inline(always)]
519 pub fn wrperr(&self) -> WRPERR_R {
520 WRPERR_R::new(((self.bits >> 4) & 1) != 0)
521 }
522 #[inline(always)]
524 pub fn pgaerr(&self) -> PGAERR_R {
525 PGAERR_R::new(((self.bits >> 5) & 1) != 0)
526 }
527 #[inline(always)]
529 pub fn pgperr(&self) -> PGPERR_R {
530 PGPERR_R::new(((self.bits >> 6) & 1) != 0)
531 }
532 #[inline(always)]
534 pub fn pgserr(&self) -> PGSERR_R {
535 PGSERR_R::new(((self.bits >> 7) & 1) != 0)
536 }
537 #[inline(always)]
539 pub fn rderr(&self) -> RDERR_R {
540 RDERR_R::new(((self.bits >> 8) & 1) != 0)
541 }
542 #[inline(always)]
544 pub fn bsy(&self) -> BSY_R {
545 BSY_R::new(((self.bits >> 16) & 1) != 0)
546 }
547}
548impl core::fmt::Debug for R {
549 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
550 f.debug_struct("SR")
551 .field("eop", &self.eop())
552 .field("operr", &self.operr())
553 .field("wrperr", &self.wrperr())
554 .field("pgaerr", &self.pgaerr())
555 .field("pgperr", &self.pgperr())
556 .field("pgserr", &self.pgserr())
557 .field("bsy", &self.bsy())
558 .field("rderr", &self.rderr())
559 .finish()
560 }
561}
562impl W {
563 #[inline(always)]
565 pub fn eop(&mut self) -> EOP_W<SRrs> {
566 EOP_W::new(self, 0)
567 }
568 #[inline(always)]
570 pub fn operr(&mut self) -> OPERR_W<SRrs> {
571 OPERR_W::new(self, 1)
572 }
573 #[inline(always)]
575 pub fn wrperr(&mut self) -> WRPERR_W<SRrs> {
576 WRPERR_W::new(self, 4)
577 }
578 #[inline(always)]
580 pub fn pgaerr(&mut self) -> PGAERR_W<SRrs> {
581 PGAERR_W::new(self, 5)
582 }
583 #[inline(always)]
585 pub fn pgperr(&mut self) -> PGPERR_W<SRrs> {
586 PGPERR_W::new(self, 6)
587 }
588 #[inline(always)]
590 pub fn pgserr(&mut self) -> PGSERR_W<SRrs> {
591 PGSERR_W::new(self, 7)
592 }
593 #[inline(always)]
595 pub fn rderr(&mut self) -> RDERR_W<SRrs> {
596 RDERR_W::new(self, 8)
597 }
598}
599pub struct SRrs;
605impl crate::RegisterSpec for SRrs {
606 type Ux = u32;
607}
608impl crate::Readable for SRrs {}
610impl crate::Writable for SRrs {
612 type Safety = crate::Unsafe;
613 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x01f3;
614}
615impl crate::Resettable for SRrs {}