esp32c3/uhci0/
int_ena.rs

1#[doc = "Register `INT_ENA` reader"]
2pub type R = crate::R<INT_ENA_SPEC>;
3#[doc = "Register `INT_ENA` writer"]
4pub type W = crate::W<INT_ENA_SPEC>;
5#[doc = "Field `RX_START` reader - a"]
6pub type RX_START_R = crate::BitReader;
7#[doc = "Field `RX_START` writer - a"]
8pub type RX_START_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TX_START` reader - a"]
10pub type TX_START_R = crate::BitReader;
11#[doc = "Field `TX_START` writer - a"]
12pub type TX_START_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RX_HUNG` reader - a"]
14pub type RX_HUNG_R = crate::BitReader;
15#[doc = "Field `RX_HUNG` writer - a"]
16pub type RX_HUNG_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TX_HUNG` reader - a"]
18pub type TX_HUNG_R = crate::BitReader;
19#[doc = "Field `TX_HUNG` writer - a"]
20pub type TX_HUNG_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SEND_S_REG_Q` reader - a"]
22pub type SEND_S_REG_Q_R = crate::BitReader;
23#[doc = "Field `SEND_S_REG_Q` writer - a"]
24pub type SEND_S_REG_Q_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SEND_A_REG_Q` reader - a"]
26pub type SEND_A_REG_Q_R = crate::BitReader;
27#[doc = "Field `SEND_A_REG_Q` writer - a"]
28pub type SEND_A_REG_Q_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `OUTLINK_EOF_ERR` reader - a"]
30pub type OUTLINK_EOF_ERR_R = crate::BitReader;
31#[doc = "Field `OUTLINK_EOF_ERR` writer - a"]
32pub type OUTLINK_EOF_ERR_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `APP_CTRL0` reader - a"]
34pub type APP_CTRL0_R = crate::BitReader;
35#[doc = "Field `APP_CTRL0` writer - a"]
36pub type APP_CTRL0_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `APP_CTRL1` reader - a"]
38pub type APP_CTRL1_R = crate::BitReader;
39#[doc = "Field `APP_CTRL1` writer - a"]
40pub type APP_CTRL1_W<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42    #[doc = "Bit 0 - a"]
43    #[inline(always)]
44    pub fn rx_start(&self) -> RX_START_R {
45        RX_START_R::new((self.bits & 1) != 0)
46    }
47    #[doc = "Bit 1 - a"]
48    #[inline(always)]
49    pub fn tx_start(&self) -> TX_START_R {
50        TX_START_R::new(((self.bits >> 1) & 1) != 0)
51    }
52    #[doc = "Bit 2 - a"]
53    #[inline(always)]
54    pub fn rx_hung(&self) -> RX_HUNG_R {
55        RX_HUNG_R::new(((self.bits >> 2) & 1) != 0)
56    }
57    #[doc = "Bit 3 - a"]
58    #[inline(always)]
59    pub fn tx_hung(&self) -> TX_HUNG_R {
60        TX_HUNG_R::new(((self.bits >> 3) & 1) != 0)
61    }
62    #[doc = "Bit 4 - a"]
63    #[inline(always)]
64    pub fn send_s_reg_q(&self) -> SEND_S_REG_Q_R {
65        SEND_S_REG_Q_R::new(((self.bits >> 4) & 1) != 0)
66    }
67    #[doc = "Bit 5 - a"]
68    #[inline(always)]
69    pub fn send_a_reg_q(&self) -> SEND_A_REG_Q_R {
70        SEND_A_REG_Q_R::new(((self.bits >> 5) & 1) != 0)
71    }
72    #[doc = "Bit 6 - a"]
73    #[inline(always)]
74    pub fn outlink_eof_err(&self) -> OUTLINK_EOF_ERR_R {
75        OUTLINK_EOF_ERR_R::new(((self.bits >> 6) & 1) != 0)
76    }
77    #[doc = "Bit 7 - a"]
78    #[inline(always)]
79    pub fn app_ctrl0(&self) -> APP_CTRL0_R {
80        APP_CTRL0_R::new(((self.bits >> 7) & 1) != 0)
81    }
82    #[doc = "Bit 8 - a"]
83    #[inline(always)]
84    pub fn app_ctrl1(&self) -> APP_CTRL1_R {
85        APP_CTRL1_R::new(((self.bits >> 8) & 1) != 0)
86    }
87}
88#[cfg(feature = "impl-register-debug")]
89impl core::fmt::Debug for R {
90    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
91        f.debug_struct("INT_ENA")
92            .field("rx_start", &self.rx_start())
93            .field("tx_start", &self.tx_start())
94            .field("rx_hung", &self.rx_hung())
95            .field("tx_hung", &self.tx_hung())
96            .field("send_s_reg_q", &self.send_s_reg_q())
97            .field("send_a_reg_q", &self.send_a_reg_q())
98            .field("outlink_eof_err", &self.outlink_eof_err())
99            .field("app_ctrl0", &self.app_ctrl0())
100            .field("app_ctrl1", &self.app_ctrl1())
101            .finish()
102    }
103}
104impl W {
105    #[doc = "Bit 0 - a"]
106    #[inline(always)]
107    pub fn rx_start(&mut self) -> RX_START_W<INT_ENA_SPEC> {
108        RX_START_W::new(self, 0)
109    }
110    #[doc = "Bit 1 - a"]
111    #[inline(always)]
112    pub fn tx_start(&mut self) -> TX_START_W<INT_ENA_SPEC> {
113        TX_START_W::new(self, 1)
114    }
115    #[doc = "Bit 2 - a"]
116    #[inline(always)]
117    pub fn rx_hung(&mut self) -> RX_HUNG_W<INT_ENA_SPEC> {
118        RX_HUNG_W::new(self, 2)
119    }
120    #[doc = "Bit 3 - a"]
121    #[inline(always)]
122    pub fn tx_hung(&mut self) -> TX_HUNG_W<INT_ENA_SPEC> {
123        TX_HUNG_W::new(self, 3)
124    }
125    #[doc = "Bit 4 - a"]
126    #[inline(always)]
127    pub fn send_s_reg_q(&mut self) -> SEND_S_REG_Q_W<INT_ENA_SPEC> {
128        SEND_S_REG_Q_W::new(self, 4)
129    }
130    #[doc = "Bit 5 - a"]
131    #[inline(always)]
132    pub fn send_a_reg_q(&mut self) -> SEND_A_REG_Q_W<INT_ENA_SPEC> {
133        SEND_A_REG_Q_W::new(self, 5)
134    }
135    #[doc = "Bit 6 - a"]
136    #[inline(always)]
137    pub fn outlink_eof_err(&mut self) -> OUTLINK_EOF_ERR_W<INT_ENA_SPEC> {
138        OUTLINK_EOF_ERR_W::new(self, 6)
139    }
140    #[doc = "Bit 7 - a"]
141    #[inline(always)]
142    pub fn app_ctrl0(&mut self) -> APP_CTRL0_W<INT_ENA_SPEC> {
143        APP_CTRL0_W::new(self, 7)
144    }
145    #[doc = "Bit 8 - a"]
146    #[inline(always)]
147    pub fn app_ctrl1(&mut self) -> APP_CTRL1_W<INT_ENA_SPEC> {
148        APP_CTRL1_W::new(self, 8)
149    }
150}
151#[doc = "a\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
152pub struct INT_ENA_SPEC;
153impl crate::RegisterSpec for INT_ENA_SPEC {
154    type Ux = u32;
155}
156#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
157impl crate::Readable for INT_ENA_SPEC {}
158#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
159impl crate::Writable for INT_ENA_SPEC {
160    type Safety = crate::Unsafe;
161    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
162    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
163}
164#[doc = "`reset()` method sets INT_ENA to value 0"]
165impl crate::Resettable for INT_ENA_SPEC {
166    const RESET_VALUE: u32 = 0;
167}