1#[doc = "Register `FREE_P3` reader"]
2pub struct R(crate::R<FREE_P3_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<FREE_P3_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<FREE_P3_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<FREE_P3_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `FREE_P3` writer"]
17pub struct W(crate::W<FREE_P3_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<FREE_P3_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<FREE_P3_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<FREE_P3_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `pin0` reader - P3.0 GPIO Mode Acknowledge"]
38pub type PIN0_R = crate::BitReader<bool>;
39#[doc = "Field `pin1` reader - P3.1 GPIO Mode Acknowledge"]
40pub type PIN1_R = crate::BitReader<bool>;
41#[doc = "Field `pin2` reader - P3.2 GPIO Mode Acknowledge"]
42pub type PIN2_R = crate::BitReader<bool>;
43#[doc = "Field `pin3` reader - P3.3 GPIO Mode Acknowledge"]
44pub type PIN3_R = crate::BitReader<bool>;
45#[doc = "Field `pin4` reader - P3.4 GPIO Mode Acknowledge"]
46pub type PIN4_R = crate::BitReader<bool>;
47#[doc = "Field `pin5` reader - P3.5 GPIO Mode Acknowledge"]
48pub type PIN5_R = crate::BitReader<bool>;
49#[doc = "Field `pin6` reader - P3.6 GPIO Mode Acknowledge"]
50pub type PIN6_R = crate::BitReader<bool>;
51#[doc = "Field `pin7` reader - P3.7 GPIO Mode Acknowledge"]
52pub type PIN7_R = crate::BitReader<bool>;
53impl R {
54 #[doc = "Bit 0 - P3.0 GPIO Mode Acknowledge"]
55 #[inline(always)]
56 pub fn pin0(&self) -> PIN0_R {
57 PIN0_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - P3.1 GPIO Mode Acknowledge"]
60 #[inline(always)]
61 pub fn pin1(&self) -> PIN1_R {
62 PIN1_R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2 - P3.2 GPIO Mode Acknowledge"]
65 #[inline(always)]
66 pub fn pin2(&self) -> PIN2_R {
67 PIN2_R::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3 - P3.3 GPIO Mode Acknowledge"]
70 #[inline(always)]
71 pub fn pin3(&self) -> PIN3_R {
72 PIN3_R::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bit 4 - P3.4 GPIO Mode Acknowledge"]
75 #[inline(always)]
76 pub fn pin4(&self) -> PIN4_R {
77 PIN4_R::new(((self.bits >> 4) & 1) != 0)
78 }
79 #[doc = "Bit 5 - P3.5 GPIO Mode Acknowledge"]
80 #[inline(always)]
81 pub fn pin5(&self) -> PIN5_R {
82 PIN5_R::new(((self.bits >> 5) & 1) != 0)
83 }
84 #[doc = "Bit 6 - P3.6 GPIO Mode Acknowledge"]
85 #[inline(always)]
86 pub fn pin6(&self) -> PIN6_R {
87 PIN6_R::new(((self.bits >> 6) & 1) != 0)
88 }
89 #[doc = "Bit 7 - P3.7 GPIO Mode Acknowledge"]
90 #[inline(always)]
91 pub fn pin7(&self) -> PIN7_R {
92 PIN7_R::new(((self.bits >> 7) & 1) != 0)
93 }
94}
95impl W {
96 #[doc = "Writes raw bits to the register."]
97 #[inline(always)]
98 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
99 self.0.bits(bits);
100 self
101 }
102}
103#[doc = "Port P3 Free for GPIO Operation Flags\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [free_p3](index.html) module"]
104pub struct FREE_P3_SPEC;
105impl crate::RegisterSpec for FREE_P3_SPEC {
106 type Ux = u32;
107}
108#[doc = "`read()` method returns [free_p3::R](R) reader structure"]
109impl crate::Readable for FREE_P3_SPEC {
110 type Reader = R;
111}
112#[doc = "`write(|w| ..)` method takes [free_p3::W](W) writer structure"]
113impl crate::Writable for FREE_P3_SPEC {
114 type Writer = W;
115}
116#[doc = "`reset()` method sets FREE_P3 to value 0"]
117impl crate::Resettable for FREE_P3_SPEC {
118 #[inline(always)]
119 fn reset_value() -> Self::Ux {
120 0
121 }
122}