rp2040_pac/spi0/
sspsr.rs
1#[doc = "Register `SSPSR` reader"]
2pub type R = crate::R<SSPSR_SPEC>;
3#[doc = "Field `TFE` reader - Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty."]
4pub type TFE_R = crate::BitReader;
5#[doc = "Field `TNF` reader - Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full."]
6pub type TNF_R = crate::BitReader;
7#[doc = "Field `RNE` reader - Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty."]
8pub type RNE_R = crate::BitReader;
9#[doc = "Field `RFF` reader - Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full."]
10pub type RFF_R = crate::BitReader;
11#[doc = "Field `BSY` reader - PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is currently transmitting and/or receiving a frame or the transmit FIFO is not empty."]
12pub type BSY_R = crate::BitReader;
13impl R {
14 #[doc = "Bit 0 - Transmit FIFO empty, RO: 0 Transmit FIFO is not empty. 1 Transmit FIFO is empty."]
15 #[inline(always)]
16 pub fn tfe(&self) -> TFE_R {
17 TFE_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Transmit FIFO not full, RO: 0 Transmit FIFO is full. 1 Transmit FIFO is not full."]
20 #[inline(always)]
21 pub fn tnf(&self) -> TNF_R {
22 TNF_R::new(((self.bits >> 1) & 1) != 0)
23 }
24 #[doc = "Bit 2 - Receive FIFO not empty, RO: 0 Receive FIFO is empty. 1 Receive FIFO is not empty."]
25 #[inline(always)]
26 pub fn rne(&self) -> RNE_R {
27 RNE_R::new(((self.bits >> 2) & 1) != 0)
28 }
29 #[doc = "Bit 3 - Receive FIFO full, RO: 0 Receive FIFO is not full. 1 Receive FIFO is full."]
30 #[inline(always)]
31 pub fn rff(&self) -> RFF_R {
32 RFF_R::new(((self.bits >> 3) & 1) != 0)
33 }
34 #[doc = "Bit 4 - PrimeCell SSP busy flag, RO: 0 SSP is idle. 1 SSP is currently transmitting and/or receiving a frame or the transmit FIFO is not empty."]
35 #[inline(always)]
36 pub fn bsy(&self) -> BSY_R {
37 BSY_R::new(((self.bits >> 4) & 1) != 0)
38 }
39}
40#[doc = "Status register, SSPSR on page 3-7
41
42You can [`read`](crate::generic::Reg::read) this register and get [`sspsr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
43pub struct SSPSR_SPEC;
44impl crate::RegisterSpec for SSPSR_SPEC {
45 type Ux = u32;
46}
47#[doc = "`read()` method returns [`sspsr::R`](R) reader structure"]
48impl crate::Readable for SSPSR_SPEC {}
49#[doc = "`reset()` method sets SSPSR to value 0x03"]
50impl crate::Resettable for SSPSR_SPEC {
51 const RESET_VALUE: u32 = 0x03;
52}