esp32s3/i2s1/
int_st.rs

1#[doc = "Register `INT_ST` reader"]
2pub type R = crate::R<INT_ST_SPEC>;
3#[doc = "Field `RX_DONE` reader - The masked interrupt status bit for the i2s_rx_done_int interrupt"]
4pub type RX_DONE_R = crate::BitReader;
5#[doc = "Field `TX_DONE` reader - The masked interrupt status bit for the i2s_tx_done_int interrupt"]
6pub type TX_DONE_R = crate::BitReader;
7#[doc = "Field `RX_HUNG` reader - The masked interrupt status bit for the i2s_rx_hung_int interrupt"]
8pub type RX_HUNG_R = crate::BitReader;
9#[doc = "Field `TX_HUNG` reader - The masked interrupt status bit for the i2s_tx_hung_int interrupt"]
10pub type TX_HUNG_R = crate::BitReader;
11impl R {
12    #[doc = "Bit 0 - The masked interrupt status bit for the i2s_rx_done_int interrupt"]
13    #[inline(always)]
14    pub fn rx_done(&self) -> RX_DONE_R {
15        RX_DONE_R::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bit 1 - The masked interrupt status bit for the i2s_tx_done_int interrupt"]
18    #[inline(always)]
19    pub fn tx_done(&self) -> TX_DONE_R {
20        TX_DONE_R::new(((self.bits >> 1) & 1) != 0)
21    }
22    #[doc = "Bit 2 - The masked interrupt status bit for the i2s_rx_hung_int interrupt"]
23    #[inline(always)]
24    pub fn rx_hung(&self) -> RX_HUNG_R {
25        RX_HUNG_R::new(((self.bits >> 2) & 1) != 0)
26    }
27    #[doc = "Bit 3 - The masked interrupt status bit for the i2s_tx_hung_int interrupt"]
28    #[inline(always)]
29    pub fn tx_hung(&self) -> TX_HUNG_R {
30        TX_HUNG_R::new(((self.bits >> 3) & 1) != 0)
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("INT_ST")
37            .field("rx_done", &self.rx_done())
38            .field("tx_done", &self.tx_done())
39            .field("rx_hung", &self.rx_hung())
40            .field("tx_hung", &self.tx_hung())
41            .finish()
42    }
43}
44#[doc = "I2S interrupt status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`int_st::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct INT_ST_SPEC;
46impl crate::RegisterSpec for INT_ST_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`int_st::R`](R) reader structure"]
50impl crate::Readable for INT_ST_SPEC {}
51#[doc = "`reset()` method sets INT_ST to value 0"]
52impl crate::Resettable for INT_ST_SPEC {
53    const RESET_VALUE: u32 = 0;
54}