1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Port 3 Control"]
28unsafe impl ::core::marker::Send for super::Port3 {}
29unsafe impl ::core::marker::Sync for super::Port3 {}
30impl super::Port3 {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Port 3 Output Data Register"]
38 #[inline(always)]
39 pub const fn podr3(&self) -> &'static crate::common::Reg<self::Podr3_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Podr3_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Port 3 Direction Register"]
48 #[inline(always)]
49 pub const fn pdr3(&self) -> &'static crate::common::Reg<self::Pdr3_SPEC, crate::common::RW> {
50 unsafe {
51 crate::common::Reg::<self::Pdr3_SPEC, crate::common::RW>::from_ptr(
52 self._svd2pac_as_ptr().add(2usize),
53 )
54 }
55 }
56
57 #[doc = "Port 3 State Register"]
58 #[inline(always)]
59 pub const fn pidr3(&self) -> &'static crate::common::Reg<self::Pidr3_SPEC, crate::common::R> {
60 unsafe {
61 crate::common::Reg::<self::Pidr3_SPEC, crate::common::R>::from_ptr(
62 self._svd2pac_as_ptr().add(6usize),
63 )
64 }
65 }
66
67 #[doc = "Port 3 Output Reset Register"]
68 #[inline(always)]
69 pub const fn porr3(&self) -> &'static crate::common::Reg<self::Porr3_SPEC, crate::common::W> {
70 unsafe {
71 crate::common::Reg::<self::Porr3_SPEC, crate::common::W>::from_ptr(
72 self._svd2pac_as_ptr().add(8usize),
73 )
74 }
75 }
76
77 #[doc = "Port 3 Output Set Register"]
78 #[inline(always)]
79 pub const fn posr3(&self) -> &'static crate::common::Reg<self::Posr3_SPEC, crate::common::W> {
80 unsafe {
81 crate::common::Reg::<self::Posr3_SPEC, crate::common::W>::from_ptr(
82 self._svd2pac_as_ptr().add(10usize),
83 )
84 }
85 }
86}
87#[doc(hidden)]
88#[derive(Copy, Clone, Eq, PartialEq)]
89pub struct Podr3_SPEC;
90impl crate::sealed::RegSpec for Podr3_SPEC {
91 type DataType = u16;
92}
93
94#[doc = "Port 3 Output Data Register"]
95pub type Podr3 = crate::RegValueT<Podr3_SPEC>;
96
97impl Podr3 {
98 #[doc = "P300 Output Data"]
99 #[inline(always)]
100 pub fn podr00(
101 self,
102 ) -> crate::common::RegisterField<
103 0,
104 0x1,
105 1,
106 0,
107 podr3::Podr00,
108 podr3::Podr00,
109 Podr3_SPEC,
110 crate::common::RW,
111 > {
112 crate::common::RegisterField::<
113 0,
114 0x1,
115 1,
116 0,
117 podr3::Podr00,
118 podr3::Podr00,
119 Podr3_SPEC,
120 crate::common::RW,
121 >::from_register(self, 0)
122 }
123}
124impl ::core::default::Default for Podr3 {
125 #[inline(always)]
126 fn default() -> Podr3 {
127 <crate::RegValueT<Podr3_SPEC> as RegisterValue<_>>::new(0)
128 }
129}
130pub mod podr3 {
131
132 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
133 pub struct Podr00_SPEC;
134 pub type Podr00 = crate::EnumBitfieldStruct<u8, Podr00_SPEC>;
135 impl Podr00 {
136 #[doc = "Low output"]
137 pub const _0: Self = Self::new(0);
138
139 #[doc = "High output"]
140 pub const _1: Self = Self::new(1);
141 }
142}
143#[doc(hidden)]
144#[derive(Copy, Clone, Eq, PartialEq)]
145pub struct Pdr3_SPEC;
146impl crate::sealed::RegSpec for Pdr3_SPEC {
147 type DataType = u16;
148}
149
150#[doc = "Port 3 Direction Register"]
151pub type Pdr3 = crate::RegValueT<Pdr3_SPEC>;
152
153impl Pdr3 {
154 #[doc = "P300 Direction"]
155 #[inline(always)]
156 pub fn pdr00(
157 self,
158 ) -> crate::common::RegisterField<
159 0,
160 0x1,
161 1,
162 0,
163 pdr3::Pdr00,
164 pdr3::Pdr00,
165 Pdr3_SPEC,
166 crate::common::RW,
167 > {
168 crate::common::RegisterField::<
169 0,
170 0x1,
171 1,
172 0,
173 pdr3::Pdr00,
174 pdr3::Pdr00,
175 Pdr3_SPEC,
176 crate::common::RW,
177 >::from_register(self, 0)
178 }
179}
180impl ::core::default::Default for Pdr3 {
181 #[inline(always)]
182 fn default() -> Pdr3 {
183 <crate::RegValueT<Pdr3_SPEC> as RegisterValue<_>>::new(0)
184 }
185}
186pub mod pdr3 {
187
188 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
189 pub struct Pdr00_SPEC;
190 pub type Pdr00 = crate::EnumBitfieldStruct<u8, Pdr00_SPEC>;
191 impl Pdr00 {
192 #[doc = "Output 0"]
193 pub const _0: Self = Self::new(0);
194
195 #[doc = "Output 1"]
196 pub const _1: Self = Self::new(1);
197 }
198}
199#[doc(hidden)]
200#[derive(Copy, Clone, Eq, PartialEq)]
201pub struct Pidr3_SPEC;
202impl crate::sealed::RegSpec for Pidr3_SPEC {
203 type DataType = u16;
204}
205
206#[doc = "Port 3 State Register"]
207pub type Pidr3 = crate::RegValueT<Pidr3_SPEC>;
208
209impl Pidr3 {
210 #[doc = "P300 State"]
211 #[inline(always)]
212 pub fn pidr00(
213 self,
214 ) -> crate::common::RegisterField<
215 0,
216 0x1,
217 1,
218 0,
219 pidr3::Pidr00,
220 pidr3::Pidr00,
221 Pidr3_SPEC,
222 crate::common::R,
223 > {
224 crate::common::RegisterField::<
225 0,
226 0x1,
227 1,
228 0,
229 pidr3::Pidr00,
230 pidr3::Pidr00,
231 Pidr3_SPEC,
232 crate::common::R,
233 >::from_register(self, 0)
234 }
235}
236impl ::core::default::Default for Pidr3 {
237 #[inline(always)]
238 fn default() -> Pidr3 {
239 <crate::RegValueT<Pidr3_SPEC> as RegisterValue<_>>::new(0)
240 }
241}
242pub mod pidr3 {
243
244 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
245 pub struct Pidr00_SPEC;
246 pub type Pidr00 = crate::EnumBitfieldStruct<u8, Pidr00_SPEC>;
247 impl Pidr00 {
248 #[doc = "Low level"]
249 pub const _0: Self = Self::new(0);
250
251 #[doc = "High level"]
252 pub const _1: Self = Self::new(1);
253 }
254}
255#[doc(hidden)]
256#[derive(Copy, Clone, Eq, PartialEq)]
257pub struct Porr3_SPEC;
258impl crate::sealed::RegSpec for Porr3_SPEC {
259 type DataType = u16;
260}
261
262#[doc = "Port 3 Output Reset Register"]
263pub type Porr3 = crate::RegValueT<Porr3_SPEC>;
264
265impl Porr3 {
266 #[doc = "P300 Output Reset"]
267 #[inline(always)]
268 pub fn porr00(
269 self,
270 ) -> crate::common::RegisterField<
271 0,
272 0x1,
273 1,
274 0,
275 porr3::Porr00,
276 porr3::Porr00,
277 Porr3_SPEC,
278 crate::common::W,
279 > {
280 crate::common::RegisterField::<
281 0,
282 0x1,
283 1,
284 0,
285 porr3::Porr00,
286 porr3::Porr00,
287 Porr3_SPEC,
288 crate::common::W,
289 >::from_register(self, 0)
290 }
291}
292impl ::core::default::Default for Porr3 {
293 #[inline(always)]
294 fn default() -> Porr3 {
295 <crate::RegValueT<Porr3_SPEC> as RegisterValue<_>>::new(0)
296 }
297}
298pub mod porr3 {
299
300 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
301 pub struct Porr00_SPEC;
302 pub type Porr00 = crate::EnumBitfieldStruct<u8, Porr00_SPEC>;
303 impl Porr00 {
304 #[doc = "No effect on output"]
305 pub const _0: Self = Self::new(0);
306
307 #[doc = "Low output"]
308 pub const _1: Self = Self::new(1);
309 }
310}
311#[doc(hidden)]
312#[derive(Copy, Clone, Eq, PartialEq)]
313pub struct Posr3_SPEC;
314impl crate::sealed::RegSpec for Posr3_SPEC {
315 type DataType = u16;
316}
317
318#[doc = "Port 3 Output Set Register"]
319pub type Posr3 = crate::RegValueT<Posr3_SPEC>;
320
321impl Posr3 {
322 #[doc = "P300 Output Set"]
323 #[inline(always)]
324 pub fn posr00(
325 self,
326 ) -> crate::common::RegisterField<
327 0,
328 0x1,
329 1,
330 0,
331 posr3::Posr00,
332 posr3::Posr00,
333 Posr3_SPEC,
334 crate::common::W,
335 > {
336 crate::common::RegisterField::<
337 0,
338 0x1,
339 1,
340 0,
341 posr3::Posr00,
342 posr3::Posr00,
343 Posr3_SPEC,
344 crate::common::W,
345 >::from_register(self, 0)
346 }
347}
348impl ::core::default::Default for Posr3 {
349 #[inline(always)]
350 fn default() -> Posr3 {
351 <crate::RegValueT<Posr3_SPEC> as RegisterValue<_>>::new(0)
352 }
353}
354pub mod posr3 {
355
356 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
357 pub struct Posr00_SPEC;
358 pub type Posr00 = crate::EnumBitfieldStruct<u8, Posr00_SPEC>;
359 impl Posr00 {
360 #[doc = "No effect on output"]
361 pub const _0: Self = Self::new(0);
362
363 #[doc = "High output"]
364 pub const _1: Self = Self::new(1);
365 }
366}