esp32/i2s0/
state.rs

1#[doc = "Register `STATE` reader"]
2pub type R = crate::R<STATE_SPEC>;
3#[doc = "Field `TX_IDLE` reader - "]
4pub type TX_IDLE_R = crate::BitReader;
5#[doc = "Field `TX_FIFO_RESET_BACK` reader - "]
6pub type TX_FIFO_RESET_BACK_R = crate::BitReader;
7#[doc = "Field `RX_FIFO_RESET_BACK` reader - "]
8pub type RX_FIFO_RESET_BACK_R = crate::BitReader;
9impl R {
10    #[doc = "Bit 0"]
11    #[inline(always)]
12    pub fn tx_idle(&self) -> TX_IDLE_R {
13        TX_IDLE_R::new((self.bits & 1) != 0)
14    }
15    #[doc = "Bit 1"]
16    #[inline(always)]
17    pub fn tx_fifo_reset_back(&self) -> TX_FIFO_RESET_BACK_R {
18        TX_FIFO_RESET_BACK_R::new(((self.bits >> 1) & 1) != 0)
19    }
20    #[doc = "Bit 2"]
21    #[inline(always)]
22    pub fn rx_fifo_reset_back(&self) -> RX_FIFO_RESET_BACK_R {
23        RX_FIFO_RESET_BACK_R::new(((self.bits >> 2) & 1) != 0)
24    }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for R {
28    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29        f.debug_struct("STATE")
30            .field("tx_idle", &self.tx_idle())
31            .field("tx_fifo_reset_back", &self.tx_fifo_reset_back())
32            .field("rx_fifo_reset_back", &self.rx_fifo_reset_back())
33            .finish()
34    }
35}
36#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`state::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct STATE_SPEC;
38impl crate::RegisterSpec for STATE_SPEC {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [`state::R`](R) reader structure"]
42impl crate::Readable for STATE_SPEC {}
43#[doc = "`reset()` method sets STATE to value 0x07"]
44impl crate::Resettable for STATE_SPEC {
45    const RESET_VALUE: u32 = 0x07;
46}