eos_s3/spi_tlc/
ahbstatus.rs

1#[doc = "Register `AHBSTATUS` reader"]
2pub struct R(crate::R<AHBSTATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<AHBSTATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<AHBSTATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<AHBSTATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `NoPendingAhbReq` reader - If set, there's pending AHB Memory Read/Write request"]
17pub struct NOPENDINGAHBREQ_R(crate::FieldReader<bool, bool>);
18impl NOPENDINGAHBREQ_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: bool) -> Self {
21        NOPENDINGAHBREQ_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for NOPENDINGAHBREQ_R {
25    type Target = crate::FieldReader<bool, bool>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31#[doc = "Field `AhbReadDataValid` reader - Set if AHB Read Data is Ready. This bit is Auto Clear Once a new AHB read Access kick off and Auto Set once AHB read data is valid."]
32pub struct AHBREADDATAVALID_R(crate::FieldReader<bool, bool>);
33impl AHBREADDATAVALID_R {
34    #[inline(always)]
35    pub(crate) fn new(bits: bool) -> Self {
36        AHBREADDATAVALID_R(crate::FieldReader::new(bits))
37    }
38}
39impl core::ops::Deref for AHBREADDATAVALID_R {
40    type Target = crate::FieldReader<bool, bool>;
41    #[inline(always)]
42    fn deref(&self) -> &Self::Target {
43        &self.0
44    }
45}
46#[doc = "Field `AhbReqFIFOFull` reader - Set if AHB Address/Data/Command FIFO is Full. (Read Only)"]
47pub struct AHBREQFIFOFULL_R(crate::FieldReader<bool, bool>);
48impl AHBREQFIFOFULL_R {
49    #[inline(always)]
50    pub(crate) fn new(bits: bool) -> Self {
51        AHBREQFIFOFULL_R(crate::FieldReader::new(bits))
52    }
53}
54impl core::ops::Deref for AHBREQFIFOFULL_R {
55    type Target = crate::FieldReader<bool, bool>;
56    #[inline(always)]
57    fn deref(&self) -> &Self::Target {
58        &self.0
59    }
60}
61#[doc = "Field `AhbReqFIFOhalfEmpty` reader - Set if AHB Address/Data/Command FIFO is less than half full."]
62pub struct AHBREQFIFOHALFEMPTY_R(crate::FieldReader<bool, bool>);
63impl AHBREQFIFOHALFEMPTY_R {
64    #[inline(always)]
65    pub(crate) fn new(bits: bool) -> Self {
66        AHBREQFIFOHALFEMPTY_R(crate::FieldReader::new(bits))
67    }
68}
69impl core::ops::Deref for AHBREQFIFOHALFEMPTY_R {
70    type Target = crate::FieldReader<bool, bool>;
71    #[inline(always)]
72    fn deref(&self) -> &Self::Target {
73        &self.0
74    }
75}
76#[doc = "Field `AhbReqFIFOSize` reader - 0 if FIFO is 4 entries, 1 if FIFO is 8 entries."]
77pub struct AHBREQFIFOSIZE_R(crate::FieldReader<u8, u8>);
78impl AHBREQFIFOSIZE_R {
79    #[inline(always)]
80    pub(crate) fn new(bits: u8) -> Self {
81        AHBREQFIFOSIZE_R(crate::FieldReader::new(bits))
82    }
83}
84impl core::ops::Deref for AHBREQFIFOSIZE_R {
85    type Target = crate::FieldReader<u8, u8>;
86    #[inline(always)]
87    fn deref(&self) -> &Self::Target {
88        &self.0
89    }
90}
91impl R {
92    #[doc = "Bit 0 - If set, there's pending AHB Memory Read/Write request"]
93    #[inline(always)]
94    pub fn no_pending_ahb_req(&self) -> NOPENDINGAHBREQ_R {
95        NOPENDINGAHBREQ_R::new((self.bits & 0x01) != 0)
96    }
97    #[doc = "Bit 1 - Set if AHB Read Data is Ready. This bit is Auto Clear Once a new AHB read Access kick off and Auto Set once AHB read data is valid."]
98    #[inline(always)]
99    pub fn ahb_read_data_valid(&self) -> AHBREADDATAVALID_R {
100        AHBREADDATAVALID_R::new(((self.bits >> 1) & 0x01) != 0)
101    }
102    #[doc = "Bit 2 - Set if AHB Address/Data/Command FIFO is Full. (Read Only)"]
103    #[inline(always)]
104    pub fn ahb_req_fifofull(&self) -> AHBREQFIFOFULL_R {
105        AHBREQFIFOFULL_R::new(((self.bits >> 2) & 0x01) != 0)
106    }
107    #[doc = "Bit 3 - Set if AHB Address/Data/Command FIFO is less than half full."]
108    #[inline(always)]
109    pub fn ahb_req_fifohalf_empty(&self) -> AHBREQFIFOHALFEMPTY_R {
110        AHBREQFIFOHALFEMPTY_R::new(((self.bits >> 3) & 0x01) != 0)
111    }
112    #[doc = "Bits 6:7 - 0 if FIFO is 4 entries, 1 if FIFO is 8 entries."]
113    #[inline(always)]
114    pub fn ahb_req_fifosize(&self) -> AHBREQFIFOSIZE_R {
115        AHBREQFIFOSIZE_R::new(((self.bits >> 6) & 0x03) as u8)
116    }
117}
118#[doc = "AHB status 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 [ahbstatus](index.html) module"]
119pub struct AHBSTATUS_SPEC;
120impl crate::RegisterSpec for AHBSTATUS_SPEC {
121    type Ux = u8;
122}
123#[doc = "`read()` method returns [ahbstatus::R](R) reader structure"]
124impl crate::Readable for AHBSTATUS_SPEC {
125    type Reader = R;
126}
127#[doc = "`reset()` method sets AHBSTATUS to value 0x08"]
128impl crate::Resettable for AHBSTATUS_SPEC {
129    #[inline(always)]
130    fn reset_value() -> Self::Ux {
131        0x08
132    }
133}