esp32c6_lp/lp_i2c0/
fifo_st.rs

1#[doc = "Register `FIFO_ST` reader"]
2pub type R = crate::R<FIFO_ST_SPEC>;
3#[doc = "Field `RXFIFO_RADDR` reader - This is the offset address of the APB reading from rxfifo"]
4pub type RXFIFO_RADDR_R = crate::FieldReader;
5#[doc = "Field `RXFIFO_WADDR` reader - This is the offset address of i2c module receiving data and writing to rxfifo."]
6pub type RXFIFO_WADDR_R = crate::FieldReader;
7#[doc = "Field `TXFIFO_RADDR` reader - This is the offset address of i2c module reading from txfifo."]
8pub type TXFIFO_RADDR_R = crate::FieldReader;
9#[doc = "Field `TXFIFO_WADDR` reader - This is the offset address of APB bus writing to txfifo."]
10pub type TXFIFO_WADDR_R = crate::FieldReader;
11impl R {
12    #[doc = "Bits 0:3 - This is the offset address of the APB reading from rxfifo"]
13    #[inline(always)]
14    pub fn rxfifo_raddr(&self) -> RXFIFO_RADDR_R {
15        RXFIFO_RADDR_R::new((self.bits & 0x0f) as u8)
16    }
17    #[doc = "Bits 5:8 - This is the offset address of i2c module receiving data and writing to rxfifo."]
18    #[inline(always)]
19    pub fn rxfifo_waddr(&self) -> RXFIFO_WADDR_R {
20        RXFIFO_WADDR_R::new(((self.bits >> 5) & 0x0f) as u8)
21    }
22    #[doc = "Bits 10:13 - This is the offset address of i2c module reading from txfifo."]
23    #[inline(always)]
24    pub fn txfifo_raddr(&self) -> TXFIFO_RADDR_R {
25        TXFIFO_RADDR_R::new(((self.bits >> 10) & 0x0f) as u8)
26    }
27    #[doc = "Bits 15:18 - This is the offset address of APB bus writing to txfifo."]
28    #[inline(always)]
29    pub fn txfifo_waddr(&self) -> TXFIFO_WADDR_R {
30        TXFIFO_WADDR_R::new(((self.bits >> 15) & 0x0f) as u8)
31    }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36        f.debug_struct("FIFO_ST")
37            .field("rxfifo_raddr", &self.rxfifo_raddr())
38            .field("rxfifo_waddr", &self.rxfifo_waddr())
39            .field("txfifo_raddr", &self.txfifo_raddr())
40            .field("txfifo_waddr", &self.txfifo_waddr())
41            .finish()
42    }
43}
44#[doc = "FIFO status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`fifo_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct FIFO_ST_SPEC;
46impl crate::RegisterSpec for FIFO_ST_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`fifo_st::R`](R) reader structure"]
50impl crate::Readable for FIFO_ST_SPEC {}
51#[doc = "`reset()` method sets FIFO_ST to value 0"]
52impl crate::Resettable for FIFO_ST_SPEC {
53    const RESET_VALUE: u32 = 0;
54}