1#[doc = "Register `SR` reader"]
2pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `BUSY` reader - BUSY field"]
17pub type BUSY_R = crate::BitReader<bool>;
18#[doc = "Field `FIFOLVL` reader - FIFOLVL field"]
19pub type FIFOLVL_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `FIFOEMPTY` reader - FIFOEMPTY field"]
21pub type FIFOEMPTY_R = crate::BitReader<bool>;
22#[doc = "Field `FIFOHFULL` reader - FIFOHFULL field"]
23pub type FIFOHFULL_R = crate::BitReader<bool>;
24#[doc = "Field `FIFOFULL` reader - FIFOFULL field"]
25pub type FIFOFULL_R = crate::BitReader<bool>;
26#[doc = "Field `FIFOOVF` reader - FIFOOVF field"]
27pub type FIFOOVF_R = crate::BitReader<bool>;
28#[doc = "Field `FIFOUVF` reader - FIFOUVF field"]
29pub type FIFOUVF_R = crate::BitReader<bool>;
30impl R {
31 #[doc = "Bit 0 - BUSY field"]
32 #[inline(always)]
33 pub fn busy(&self) -> BUSY_R {
34 BUSY_R::new((self.bits & 1) != 0)
35 }
36 #[doc = "Bits 24:26 - FIFOLVL field"]
37 #[inline(always)]
38 pub fn fifolvl(&self) -> FIFOLVL_R {
39 FIFOLVL_R::new(((self.bits >> 24) & 7) as u8)
40 }
41 #[doc = "Bit 27 - FIFOEMPTY field"]
42 #[inline(always)]
43 pub fn fifoempty(&self) -> FIFOEMPTY_R {
44 FIFOEMPTY_R::new(((self.bits >> 27) & 1) != 0)
45 }
46 #[doc = "Bit 28 - FIFOHFULL field"]
47 #[inline(always)]
48 pub fn fifohfull(&self) -> FIFOHFULL_R {
49 FIFOHFULL_R::new(((self.bits >> 28) & 1) != 0)
50 }
51 #[doc = "Bit 29 - FIFOFULL field"]
52 #[inline(always)]
53 pub fn fifofull(&self) -> FIFOFULL_R {
54 FIFOFULL_R::new(((self.bits >> 29) & 1) != 0)
55 }
56 #[doc = "Bit 30 - FIFOOVF field"]
57 #[inline(always)]
58 pub fn fifoovf(&self) -> FIFOOVF_R {
59 FIFOOVF_R::new(((self.bits >> 30) & 1) != 0)
60 }
61 #[doc = "Bit 31 - FIFOUVF field"]
62 #[inline(always)]
63 pub fn fifouvf(&self) -> FIFOUVF_R {
64 FIFOUVF_R::new(((self.bits >> 31) & 1) != 0)
65 }
66}
67#[doc = "SR register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sr](index.html) module"]
68pub struct SR_SPEC;
69impl crate::RegisterSpec for SR_SPEC {
70 type Ux = u32;
71}
72#[doc = "`read()` method returns [sr::R](R) reader structure"]
73impl crate::Readable for SR_SPEC {
74 type Reader = R;
75}
76#[doc = "`reset()` method sets SR to value 0"]
77impl crate::Resettable for SR_SPEC {
78 #[inline(always)]
79 fn reset_value() -> Self::Ux {
80 0
81 }
82}