d1_pac/spi_dbi/
spi_fsr.rs1#[doc = "Register `spi_fsr` reader"]
2pub type R = crate::R<SPI_FSR_SPEC>;
3#[doc = "Field `rf_cnt` reader - RXFIFO Counter\n\nThese bits indicate the number of bytes in RXFIFO"]
4pub type RF_CNT_R = crate::FieldReader;
5#[doc = "Field `rb_cnt` reader - RXFIFO Write Buffer Counter"]
6pub type RB_CNT_R = crate::FieldReader;
7#[doc = "Field `rb_wr` reader - RXFIFO Write Buffer Write Enable"]
8pub type RB_WR_R = crate::BitReader;
9#[doc = "Field `tf_cnt` reader - TXFIFO Counter\n\nThese bits indicate the number of bytes in TXFIFO"]
10pub type TF_CNT_R = crate::FieldReader;
11#[doc = "Field `tb_cnt` reader - TXFIFO Write Buffer Counter"]
12pub type TB_CNT_R = crate::FieldReader;
13#[doc = "Field `tb_wr` reader - TXFIFO Write Buffer Write Enable"]
14pub type TB_WR_R = crate::BitReader;
15impl R {
16 #[doc = "Bits 0:7 - RXFIFO Counter\n\nThese bits indicate the number of bytes in RXFIFO"]
17 #[inline(always)]
18 pub fn rf_cnt(&self) -> RF_CNT_R {
19 RF_CNT_R::new((self.bits & 0xff) as u8)
20 }
21 #[doc = "Bits 12:14 - RXFIFO Write Buffer Counter"]
22 #[inline(always)]
23 pub fn rb_cnt(&self) -> RB_CNT_R {
24 RB_CNT_R::new(((self.bits >> 12) & 7) as u8)
25 }
26 #[doc = "Bit 15 - RXFIFO Write Buffer Write Enable"]
27 #[inline(always)]
28 pub fn rb_wr(&self) -> RB_WR_R {
29 RB_WR_R::new(((self.bits >> 15) & 1) != 0)
30 }
31 #[doc = "Bits 16:23 - TXFIFO Counter\n\nThese bits indicate the number of bytes in TXFIFO"]
32 #[inline(always)]
33 pub fn tf_cnt(&self) -> TF_CNT_R {
34 TF_CNT_R::new(((self.bits >> 16) & 0xff) as u8)
35 }
36 #[doc = "Bits 28:30 - TXFIFO Write Buffer Counter"]
37 #[inline(always)]
38 pub fn tb_cnt(&self) -> TB_CNT_R {
39 TB_CNT_R::new(((self.bits >> 28) & 7) as u8)
40 }
41 #[doc = "Bit 31 - TXFIFO Write Buffer Write Enable"]
42 #[inline(always)]
43 pub fn tb_wr(&self) -> TB_WR_R {
44 TB_WR_R::new(((self.bits >> 31) & 1) != 0)
45 }
46}
47#[doc = "SPI FIFO Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`spi_fsr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct SPI_FSR_SPEC;
49impl crate::RegisterSpec for SPI_FSR_SPEC {
50 type Ux = u32;
51}
52#[doc = "`read()` method returns [`spi_fsr::R`](R) reader structure"]
53impl crate::Readable for SPI_FSR_SPEC {}
54#[doc = "`reset()` method sets spi_fsr to value 0"]
55impl crate::Resettable for SPI_FSR_SPEC {
56 const RESET_VALUE: Self::Ux = 0;
57}