stm32wb_pac/quadspi/
sr.rs

1#[doc = "Reader of register SR"]
2pub type R = crate::R<u32, super::SR>;
3#[doc = "Reader of field `FLEVEL`"]
4pub type FLEVEL_R = crate::R<u8, u8>;
5#[doc = "Reader of field `BUSY`"]
6pub type BUSY_R = crate::R<bool, bool>;
7#[doc = "Reader of field `TOF`"]
8pub type TOF_R = crate::R<bool, bool>;
9#[doc = "Reader of field `SMF`"]
10pub type SMF_R = crate::R<bool, bool>;
11#[doc = "Reader of field `FTF`"]
12pub type FTF_R = crate::R<bool, bool>;
13#[doc = "Reader of field `TCF`"]
14pub type TCF_R = crate::R<bool, bool>;
15#[doc = "Reader of field `TEF`"]
16pub type TEF_R = crate::R<bool, bool>;
17impl R {
18    #[doc = "Bits 8:12 - FIFO level"]
19    #[inline(always)]
20    pub fn flevel(&self) -> FLEVEL_R {
21        FLEVEL_R::new(((self.bits >> 8) & 0x1f) as u8)
22    }
23    #[doc = "Bit 5 - Busy"]
24    #[inline(always)]
25    pub fn busy(&self) -> BUSY_R {
26        BUSY_R::new(((self.bits >> 5) & 0x01) != 0)
27    }
28    #[doc = "Bit 4 - Timeout flag"]
29    #[inline(always)]
30    pub fn tof(&self) -> TOF_R {
31        TOF_R::new(((self.bits >> 4) & 0x01) != 0)
32    }
33    #[doc = "Bit 3 - Status match flag"]
34    #[inline(always)]
35    pub fn smf(&self) -> SMF_R {
36        SMF_R::new(((self.bits >> 3) & 0x01) != 0)
37    }
38    #[doc = "Bit 2 - FIFO threshold flag"]
39    #[inline(always)]
40    pub fn ftf(&self) -> FTF_R {
41        FTF_R::new(((self.bits >> 2) & 0x01) != 0)
42    }
43    #[doc = "Bit 1 - Transfer complete flag"]
44    #[inline(always)]
45    pub fn tcf(&self) -> TCF_R {
46        TCF_R::new(((self.bits >> 1) & 0x01) != 0)
47    }
48    #[doc = "Bit 0 - Transfer error flag"]
49    #[inline(always)]
50    pub fn tef(&self) -> TEF_R {
51        TEF_R::new((self.bits & 0x01) != 0)
52    }
53}