esp32c3/uhci0/
escape_conf.rs

1#[doc = "Register `ESCAPE_CONF` reader"]
2pub type R = crate::R<ESCAPE_CONF_SPEC>;
3#[doc = "Register `ESCAPE_CONF` writer"]
4pub type W = crate::W<ESCAPE_CONF_SPEC>;
5#[doc = "Field `TX_C0_ESC_EN` reader - a"]
6pub type TX_C0_ESC_EN_R = crate::BitReader;
7#[doc = "Field `TX_C0_ESC_EN` writer - a"]
8pub type TX_C0_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TX_DB_ESC_EN` reader - a"]
10pub type TX_DB_ESC_EN_R = crate::BitReader;
11#[doc = "Field `TX_DB_ESC_EN` writer - a"]
12pub type TX_DB_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `TX_11_ESC_EN` reader - a"]
14pub type TX_11_ESC_EN_R = crate::BitReader;
15#[doc = "Field `TX_11_ESC_EN` writer - a"]
16pub type TX_11_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TX_13_ESC_EN` reader - a"]
18pub type TX_13_ESC_EN_R = crate::BitReader;
19#[doc = "Field `TX_13_ESC_EN` writer - a"]
20pub type TX_13_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RX_C0_ESC_EN` reader - a"]
22pub type RX_C0_ESC_EN_R = crate::BitReader;
23#[doc = "Field `RX_C0_ESC_EN` writer - a"]
24pub type RX_C0_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RX_DB_ESC_EN` reader - a"]
26pub type RX_DB_ESC_EN_R = crate::BitReader;
27#[doc = "Field `RX_DB_ESC_EN` writer - a"]
28pub type RX_DB_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `RX_11_ESC_EN` reader - a"]
30pub type RX_11_ESC_EN_R = crate::BitReader;
31#[doc = "Field `RX_11_ESC_EN` writer - a"]
32pub type RX_11_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `RX_13_ESC_EN` reader - a"]
34pub type RX_13_ESC_EN_R = crate::BitReader;
35#[doc = "Field `RX_13_ESC_EN` writer - a"]
36pub type RX_13_ESC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38    #[doc = "Bit 0 - a"]
39    #[inline(always)]
40    pub fn tx_c0_esc_en(&self) -> TX_C0_ESC_EN_R {
41        TX_C0_ESC_EN_R::new((self.bits & 1) != 0)
42    }
43    #[doc = "Bit 1 - a"]
44    #[inline(always)]
45    pub fn tx_db_esc_en(&self) -> TX_DB_ESC_EN_R {
46        TX_DB_ESC_EN_R::new(((self.bits >> 1) & 1) != 0)
47    }
48    #[doc = "Bit 2 - a"]
49    #[inline(always)]
50    pub fn tx_11_esc_en(&self) -> TX_11_ESC_EN_R {
51        TX_11_ESC_EN_R::new(((self.bits >> 2) & 1) != 0)
52    }
53    #[doc = "Bit 3 - a"]
54    #[inline(always)]
55    pub fn tx_13_esc_en(&self) -> TX_13_ESC_EN_R {
56        TX_13_ESC_EN_R::new(((self.bits >> 3) & 1) != 0)
57    }
58    #[doc = "Bit 4 - a"]
59    #[inline(always)]
60    pub fn rx_c0_esc_en(&self) -> RX_C0_ESC_EN_R {
61        RX_C0_ESC_EN_R::new(((self.bits >> 4) & 1) != 0)
62    }
63    #[doc = "Bit 5 - a"]
64    #[inline(always)]
65    pub fn rx_db_esc_en(&self) -> RX_DB_ESC_EN_R {
66        RX_DB_ESC_EN_R::new(((self.bits >> 5) & 1) != 0)
67    }
68    #[doc = "Bit 6 - a"]
69    #[inline(always)]
70    pub fn rx_11_esc_en(&self) -> RX_11_ESC_EN_R {
71        RX_11_ESC_EN_R::new(((self.bits >> 6) & 1) != 0)
72    }
73    #[doc = "Bit 7 - a"]
74    #[inline(always)]
75    pub fn rx_13_esc_en(&self) -> RX_13_ESC_EN_R {
76        RX_13_ESC_EN_R::new(((self.bits >> 7) & 1) != 0)
77    }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for R {
81    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82        f.debug_struct("ESCAPE_CONF")
83            .field("tx_c0_esc_en", &self.tx_c0_esc_en())
84            .field("tx_db_esc_en", &self.tx_db_esc_en())
85            .field("tx_11_esc_en", &self.tx_11_esc_en())
86            .field("tx_13_esc_en", &self.tx_13_esc_en())
87            .field("rx_c0_esc_en", &self.rx_c0_esc_en())
88            .field("rx_db_esc_en", &self.rx_db_esc_en())
89            .field("rx_11_esc_en", &self.rx_11_esc_en())
90            .field("rx_13_esc_en", &self.rx_13_esc_en())
91            .finish()
92    }
93}
94impl W {
95    #[doc = "Bit 0 - a"]
96    #[inline(always)]
97    pub fn tx_c0_esc_en(&mut self) -> TX_C0_ESC_EN_W<ESCAPE_CONF_SPEC> {
98        TX_C0_ESC_EN_W::new(self, 0)
99    }
100    #[doc = "Bit 1 - a"]
101    #[inline(always)]
102    pub fn tx_db_esc_en(&mut self) -> TX_DB_ESC_EN_W<ESCAPE_CONF_SPEC> {
103        TX_DB_ESC_EN_W::new(self, 1)
104    }
105    #[doc = "Bit 2 - a"]
106    #[inline(always)]
107    pub fn tx_11_esc_en(&mut self) -> TX_11_ESC_EN_W<ESCAPE_CONF_SPEC> {
108        TX_11_ESC_EN_W::new(self, 2)
109    }
110    #[doc = "Bit 3 - a"]
111    #[inline(always)]
112    pub fn tx_13_esc_en(&mut self) -> TX_13_ESC_EN_W<ESCAPE_CONF_SPEC> {
113        TX_13_ESC_EN_W::new(self, 3)
114    }
115    #[doc = "Bit 4 - a"]
116    #[inline(always)]
117    pub fn rx_c0_esc_en(&mut self) -> RX_C0_ESC_EN_W<ESCAPE_CONF_SPEC> {
118        RX_C0_ESC_EN_W::new(self, 4)
119    }
120    #[doc = "Bit 5 - a"]
121    #[inline(always)]
122    pub fn rx_db_esc_en(&mut self) -> RX_DB_ESC_EN_W<ESCAPE_CONF_SPEC> {
123        RX_DB_ESC_EN_W::new(self, 5)
124    }
125    #[doc = "Bit 6 - a"]
126    #[inline(always)]
127    pub fn rx_11_esc_en(&mut self) -> RX_11_ESC_EN_W<ESCAPE_CONF_SPEC> {
128        RX_11_ESC_EN_W::new(self, 6)
129    }
130    #[doc = "Bit 7 - a"]
131    #[inline(always)]
132    pub fn rx_13_esc_en(&mut self) -> RX_13_ESC_EN_W<ESCAPE_CONF_SPEC> {
133        RX_13_ESC_EN_W::new(self, 7)
134    }
135}
136#[doc = "a\n\nYou can [`read`](crate::Reg::read) this register and get [`escape_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`escape_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
137pub struct ESCAPE_CONF_SPEC;
138impl crate::RegisterSpec for ESCAPE_CONF_SPEC {
139    type Ux = u32;
140}
141#[doc = "`read()` method returns [`escape_conf::R`](R) reader structure"]
142impl crate::Readable for ESCAPE_CONF_SPEC {}
143#[doc = "`write(|w| ..)` method takes [`escape_conf::W`](W) writer structure"]
144impl crate::Writable for ESCAPE_CONF_SPEC {
145    type Safety = crate::Unsafe;
146    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
147    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
148}
149#[doc = "`reset()` method sets ESCAPE_CONF to value 0x33"]
150impl crate::Resettable for ESCAPE_CONF_SPEC {
151    const RESET_VALUE: u32 = 0x33;
152}