rp2040_pac/usbctrl_regs/
usbphy_direct_override.rs
1#[doc = "Register `USBPHY_DIRECT_OVERRIDE` reader"]
2pub type R = crate::R<USBPHY_DIRECT_OVERRIDE_SPEC>;
3#[doc = "Register `USBPHY_DIRECT_OVERRIDE` writer"]
4pub type W = crate::W<USBPHY_DIRECT_OVERRIDE_SPEC>;
5#[doc = "Field `DP_PULLUP_HISEL_OVERRIDE_EN` reader - "]
6pub type DP_PULLUP_HISEL_OVERRIDE_EN_R = crate::BitReader;
7#[doc = "Field `DP_PULLUP_HISEL_OVERRIDE_EN` writer - "]
8pub type DP_PULLUP_HISEL_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DM_PULLUP_HISEL_OVERRIDE_EN` reader - "]
10pub type DM_PULLUP_HISEL_OVERRIDE_EN_R = crate::BitReader;
11#[doc = "Field `DM_PULLUP_HISEL_OVERRIDE_EN` writer - "]
12pub type DM_PULLUP_HISEL_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `DP_PULLUP_EN_OVERRIDE_EN` reader - "]
14pub type DP_PULLUP_EN_OVERRIDE_EN_R = crate::BitReader;
15#[doc = "Field `DP_PULLUP_EN_OVERRIDE_EN` writer - "]
16pub type DP_PULLUP_EN_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `DP_PULLDN_EN_OVERRIDE_EN` reader - "]
18pub type DP_PULLDN_EN_OVERRIDE_EN_R = crate::BitReader;
19#[doc = "Field `DP_PULLDN_EN_OVERRIDE_EN` writer - "]
20pub type DP_PULLDN_EN_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `DM_PULLDN_EN_OVERRIDE_EN` reader - "]
22pub type DM_PULLDN_EN_OVERRIDE_EN_R = crate::BitReader;
23#[doc = "Field `DM_PULLDN_EN_OVERRIDE_EN` writer - "]
24pub type DM_PULLDN_EN_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `TX_DP_OE_OVERRIDE_EN` reader - "]
26pub type TX_DP_OE_OVERRIDE_EN_R = crate::BitReader;
27#[doc = "Field `TX_DP_OE_OVERRIDE_EN` writer - "]
28pub type TX_DP_OE_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TX_DM_OE_OVERRIDE_EN` reader - "]
30pub type TX_DM_OE_OVERRIDE_EN_R = crate::BitReader;
31#[doc = "Field `TX_DM_OE_OVERRIDE_EN` writer - "]
32pub type TX_DM_OE_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TX_DP_OVERRIDE_EN` reader - "]
34pub type TX_DP_OVERRIDE_EN_R = crate::BitReader;
35#[doc = "Field `TX_DP_OVERRIDE_EN` writer - "]
36pub type TX_DP_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TX_DM_OVERRIDE_EN` reader - "]
38pub type TX_DM_OVERRIDE_EN_R = crate::BitReader;
39#[doc = "Field `TX_DM_OVERRIDE_EN` writer - "]
40pub type TX_DM_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `RX_PD_OVERRIDE_EN` reader - "]
42pub type RX_PD_OVERRIDE_EN_R = crate::BitReader;
43#[doc = "Field `RX_PD_OVERRIDE_EN` writer - "]
44pub type RX_PD_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `TX_PD_OVERRIDE_EN` reader - "]
46pub type TX_PD_OVERRIDE_EN_R = crate::BitReader;
47#[doc = "Field `TX_PD_OVERRIDE_EN` writer - "]
48pub type TX_PD_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `TX_FSSLEW_OVERRIDE_EN` reader - "]
50pub type TX_FSSLEW_OVERRIDE_EN_R = crate::BitReader;
51#[doc = "Field `TX_FSSLEW_OVERRIDE_EN` writer - "]
52pub type TX_FSSLEW_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `DM_PULLUP_OVERRIDE_EN` reader - "]
54pub type DM_PULLUP_OVERRIDE_EN_R = crate::BitReader;
55#[doc = "Field `DM_PULLUP_OVERRIDE_EN` writer - "]
56pub type DM_PULLUP_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `TX_DIFFMODE_OVERRIDE_EN` reader - "]
58pub type TX_DIFFMODE_OVERRIDE_EN_R = crate::BitReader;
59#[doc = "Field `TX_DIFFMODE_OVERRIDE_EN` writer - "]
60pub type TX_DIFFMODE_OVERRIDE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
61impl R {
62 #[doc = "Bit 0"]
63 #[inline(always)]
64 pub fn dp_pullup_hisel_override_en(&self) -> DP_PULLUP_HISEL_OVERRIDE_EN_R {
65 DP_PULLUP_HISEL_OVERRIDE_EN_R::new((self.bits & 1) != 0)
66 }
67 #[doc = "Bit 1"]
68 #[inline(always)]
69 pub fn dm_pullup_hisel_override_en(&self) -> DM_PULLUP_HISEL_OVERRIDE_EN_R {
70 DM_PULLUP_HISEL_OVERRIDE_EN_R::new(((self.bits >> 1) & 1) != 0)
71 }
72 #[doc = "Bit 2"]
73 #[inline(always)]
74 pub fn dp_pullup_en_override_en(&self) -> DP_PULLUP_EN_OVERRIDE_EN_R {
75 DP_PULLUP_EN_OVERRIDE_EN_R::new(((self.bits >> 2) & 1) != 0)
76 }
77 #[doc = "Bit 3"]
78 #[inline(always)]
79 pub fn dp_pulldn_en_override_en(&self) -> DP_PULLDN_EN_OVERRIDE_EN_R {
80 DP_PULLDN_EN_OVERRIDE_EN_R::new(((self.bits >> 3) & 1) != 0)
81 }
82 #[doc = "Bit 4"]
83 #[inline(always)]
84 pub fn dm_pulldn_en_override_en(&self) -> DM_PULLDN_EN_OVERRIDE_EN_R {
85 DM_PULLDN_EN_OVERRIDE_EN_R::new(((self.bits >> 4) & 1) != 0)
86 }
87 #[doc = "Bit 5"]
88 #[inline(always)]
89 pub fn tx_dp_oe_override_en(&self) -> TX_DP_OE_OVERRIDE_EN_R {
90 TX_DP_OE_OVERRIDE_EN_R::new(((self.bits >> 5) & 1) != 0)
91 }
92 #[doc = "Bit 6"]
93 #[inline(always)]
94 pub fn tx_dm_oe_override_en(&self) -> TX_DM_OE_OVERRIDE_EN_R {
95 TX_DM_OE_OVERRIDE_EN_R::new(((self.bits >> 6) & 1) != 0)
96 }
97 #[doc = "Bit 7"]
98 #[inline(always)]
99 pub fn tx_dp_override_en(&self) -> TX_DP_OVERRIDE_EN_R {
100 TX_DP_OVERRIDE_EN_R::new(((self.bits >> 7) & 1) != 0)
101 }
102 #[doc = "Bit 8"]
103 #[inline(always)]
104 pub fn tx_dm_override_en(&self) -> TX_DM_OVERRIDE_EN_R {
105 TX_DM_OVERRIDE_EN_R::new(((self.bits >> 8) & 1) != 0)
106 }
107 #[doc = "Bit 9"]
108 #[inline(always)]
109 pub fn rx_pd_override_en(&self) -> RX_PD_OVERRIDE_EN_R {
110 RX_PD_OVERRIDE_EN_R::new(((self.bits >> 9) & 1) != 0)
111 }
112 #[doc = "Bit 10"]
113 #[inline(always)]
114 pub fn tx_pd_override_en(&self) -> TX_PD_OVERRIDE_EN_R {
115 TX_PD_OVERRIDE_EN_R::new(((self.bits >> 10) & 1) != 0)
116 }
117 #[doc = "Bit 11"]
118 #[inline(always)]
119 pub fn tx_fsslew_override_en(&self) -> TX_FSSLEW_OVERRIDE_EN_R {
120 TX_FSSLEW_OVERRIDE_EN_R::new(((self.bits >> 11) & 1) != 0)
121 }
122 #[doc = "Bit 12"]
123 #[inline(always)]
124 pub fn dm_pullup_override_en(&self) -> DM_PULLUP_OVERRIDE_EN_R {
125 DM_PULLUP_OVERRIDE_EN_R::new(((self.bits >> 12) & 1) != 0)
126 }
127 #[doc = "Bit 15"]
128 #[inline(always)]
129 pub fn tx_diffmode_override_en(&self) -> TX_DIFFMODE_OVERRIDE_EN_R {
130 TX_DIFFMODE_OVERRIDE_EN_R::new(((self.bits >> 15) & 1) != 0)
131 }
132}
133impl W {
134 #[doc = "Bit 0"]
135 #[inline(always)]
136 #[must_use]
137 pub fn dp_pullup_hisel_override_en(
138 &mut self,
139 ) -> DP_PULLUP_HISEL_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
140 DP_PULLUP_HISEL_OVERRIDE_EN_W::new(self, 0)
141 }
142 #[doc = "Bit 1"]
143 #[inline(always)]
144 #[must_use]
145 pub fn dm_pullup_hisel_override_en(
146 &mut self,
147 ) -> DM_PULLUP_HISEL_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
148 DM_PULLUP_HISEL_OVERRIDE_EN_W::new(self, 1)
149 }
150 #[doc = "Bit 2"]
151 #[inline(always)]
152 #[must_use]
153 pub fn dp_pullup_en_override_en(
154 &mut self,
155 ) -> DP_PULLUP_EN_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
156 DP_PULLUP_EN_OVERRIDE_EN_W::new(self, 2)
157 }
158 #[doc = "Bit 3"]
159 #[inline(always)]
160 #[must_use]
161 pub fn dp_pulldn_en_override_en(
162 &mut self,
163 ) -> DP_PULLDN_EN_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
164 DP_PULLDN_EN_OVERRIDE_EN_W::new(self, 3)
165 }
166 #[doc = "Bit 4"]
167 #[inline(always)]
168 #[must_use]
169 pub fn dm_pulldn_en_override_en(
170 &mut self,
171 ) -> DM_PULLDN_EN_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
172 DM_PULLDN_EN_OVERRIDE_EN_W::new(self, 4)
173 }
174 #[doc = "Bit 5"]
175 #[inline(always)]
176 #[must_use]
177 pub fn tx_dp_oe_override_en(&mut self) -> TX_DP_OE_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
178 TX_DP_OE_OVERRIDE_EN_W::new(self, 5)
179 }
180 #[doc = "Bit 6"]
181 #[inline(always)]
182 #[must_use]
183 pub fn tx_dm_oe_override_en(&mut self) -> TX_DM_OE_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
184 TX_DM_OE_OVERRIDE_EN_W::new(self, 6)
185 }
186 #[doc = "Bit 7"]
187 #[inline(always)]
188 #[must_use]
189 pub fn tx_dp_override_en(&mut self) -> TX_DP_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
190 TX_DP_OVERRIDE_EN_W::new(self, 7)
191 }
192 #[doc = "Bit 8"]
193 #[inline(always)]
194 #[must_use]
195 pub fn tx_dm_override_en(&mut self) -> TX_DM_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
196 TX_DM_OVERRIDE_EN_W::new(self, 8)
197 }
198 #[doc = "Bit 9"]
199 #[inline(always)]
200 #[must_use]
201 pub fn rx_pd_override_en(&mut self) -> RX_PD_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
202 RX_PD_OVERRIDE_EN_W::new(self, 9)
203 }
204 #[doc = "Bit 10"]
205 #[inline(always)]
206 #[must_use]
207 pub fn tx_pd_override_en(&mut self) -> TX_PD_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
208 TX_PD_OVERRIDE_EN_W::new(self, 10)
209 }
210 #[doc = "Bit 11"]
211 #[inline(always)]
212 #[must_use]
213 pub fn tx_fsslew_override_en(
214 &mut self,
215 ) -> TX_FSSLEW_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
216 TX_FSSLEW_OVERRIDE_EN_W::new(self, 11)
217 }
218 #[doc = "Bit 12"]
219 #[inline(always)]
220 #[must_use]
221 pub fn dm_pullup_override_en(
222 &mut self,
223 ) -> DM_PULLUP_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
224 DM_PULLUP_OVERRIDE_EN_W::new(self, 12)
225 }
226 #[doc = "Bit 15"]
227 #[inline(always)]
228 #[must_use]
229 pub fn tx_diffmode_override_en(
230 &mut self,
231 ) -> TX_DIFFMODE_OVERRIDE_EN_W<USBPHY_DIRECT_OVERRIDE_SPEC> {
232 TX_DIFFMODE_OVERRIDE_EN_W::new(self, 15)
233 }
234 #[doc = r" Writes raw bits to the register."]
235 #[doc = r""]
236 #[doc = r" # Safety"]
237 #[doc = r""]
238 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
239 #[inline(always)]
240 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
241 self.bits = bits;
242 self
243 }
244}
245#[doc = "Override enable for each control in usbphy_direct
246
247You can [`read`](crate::generic::Reg::read) this register and get [`usbphy_direct_override::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`usbphy_direct_override::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
248pub struct USBPHY_DIRECT_OVERRIDE_SPEC;
249impl crate::RegisterSpec for USBPHY_DIRECT_OVERRIDE_SPEC {
250 type Ux = u32;
251}
252#[doc = "`read()` method returns [`usbphy_direct_override::R`](R) reader structure"]
253impl crate::Readable for USBPHY_DIRECT_OVERRIDE_SPEC {}
254#[doc = "`write(|w| ..)` method takes [`usbphy_direct_override::W`](W) writer structure"]
255impl crate::Writable for USBPHY_DIRECT_OVERRIDE_SPEC {
256 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
257 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
258}
259#[doc = "`reset()` method sets USBPHY_DIRECT_OVERRIDE to value 0"]
260impl crate::Resettable for USBPHY_DIRECT_OVERRIDE_SPEC {
261 const RESET_VALUE: u32 = 0;
262}