swm341_pac/porta/
func1.rs1#[doc = "Register `FUNC1` reader"]
2pub struct R(crate::R<FUNC1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<FUNC1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<FUNC1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<FUNC1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `FUNC1` writer"]
17pub struct W(crate::W<FUNC1_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<FUNC1_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<FUNC1_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<FUNC1_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `PIN8` reader - PIN8 field"]
38pub type PIN8_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `PIN8` writer - PIN8 field"]
40pub type PIN8_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
41#[doc = "Field `PIN9` reader - PIN9 field"]
42pub type PIN9_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `PIN9` writer - PIN9 field"]
44pub type PIN9_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
45#[doc = "Field `PIN10` reader - PIN10 field"]
46pub type PIN10_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `PIN10` writer - PIN10 field"]
48pub type PIN10_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
49#[doc = "Field `PIN11` reader - PIN11 field"]
50pub type PIN11_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `PIN11` writer - PIN11 field"]
52pub type PIN11_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
53#[doc = "Field `PIN12` reader - PIN12 field"]
54pub type PIN12_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `PIN12` writer - PIN12 field"]
56pub type PIN12_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
57#[doc = "Field `PIN13` reader - PIN13 field"]
58pub type PIN13_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `PIN13` writer - PIN13 field"]
60pub type PIN13_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
61#[doc = "Field `PIN14` reader - PIN14 field"]
62pub type PIN14_R = crate::FieldReader<u8, u8>;
63#[doc = "Field `PIN14` writer - PIN14 field"]
64pub type PIN14_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
65#[doc = "Field `PIN15` reader - PIN15 field"]
66pub type PIN15_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `PIN15` writer - PIN15 field"]
68pub type PIN15_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FUNC1_SPEC, u8, u8, 4, O>;
69impl R {
70 #[doc = "Bits 0:3 - PIN8 field"]
71 #[inline(always)]
72 pub fn pin8(&self) -> PIN8_R {
73 PIN8_R::new((self.bits & 0x0f) as u8)
74 }
75 #[doc = "Bits 4:7 - PIN9 field"]
76 #[inline(always)]
77 pub fn pin9(&self) -> PIN9_R {
78 PIN9_R::new(((self.bits >> 4) & 0x0f) as u8)
79 }
80 #[doc = "Bits 8:11 - PIN10 field"]
81 #[inline(always)]
82 pub fn pin10(&self) -> PIN10_R {
83 PIN10_R::new(((self.bits >> 8) & 0x0f) as u8)
84 }
85 #[doc = "Bits 12:15 - PIN11 field"]
86 #[inline(always)]
87 pub fn pin11(&self) -> PIN11_R {
88 PIN11_R::new(((self.bits >> 12) & 0x0f) as u8)
89 }
90 #[doc = "Bits 16:19 - PIN12 field"]
91 #[inline(always)]
92 pub fn pin12(&self) -> PIN12_R {
93 PIN12_R::new(((self.bits >> 16) & 0x0f) as u8)
94 }
95 #[doc = "Bits 20:23 - PIN13 field"]
96 #[inline(always)]
97 pub fn pin13(&self) -> PIN13_R {
98 PIN13_R::new(((self.bits >> 20) & 0x0f) as u8)
99 }
100 #[doc = "Bits 24:27 - PIN14 field"]
101 #[inline(always)]
102 pub fn pin14(&self) -> PIN14_R {
103 PIN14_R::new(((self.bits >> 24) & 0x0f) as u8)
104 }
105 #[doc = "Bits 28:31 - PIN15 field"]
106 #[inline(always)]
107 pub fn pin15(&self) -> PIN15_R {
108 PIN15_R::new(((self.bits >> 28) & 0x0f) as u8)
109 }
110}
111impl W {
112 #[doc = "Bits 0:3 - PIN8 field"]
113 #[inline(always)]
114 pub fn pin8(&mut self) -> PIN8_W<0> {
115 PIN8_W::new(self)
116 }
117 #[doc = "Bits 4:7 - PIN9 field"]
118 #[inline(always)]
119 pub fn pin9(&mut self) -> PIN9_W<4> {
120 PIN9_W::new(self)
121 }
122 #[doc = "Bits 8:11 - PIN10 field"]
123 #[inline(always)]
124 pub fn pin10(&mut self) -> PIN10_W<8> {
125 PIN10_W::new(self)
126 }
127 #[doc = "Bits 12:15 - PIN11 field"]
128 #[inline(always)]
129 pub fn pin11(&mut self) -> PIN11_W<12> {
130 PIN11_W::new(self)
131 }
132 #[doc = "Bits 16:19 - PIN12 field"]
133 #[inline(always)]
134 pub fn pin12(&mut self) -> PIN12_W<16> {
135 PIN12_W::new(self)
136 }
137 #[doc = "Bits 20:23 - PIN13 field"]
138 #[inline(always)]
139 pub fn pin13(&mut self) -> PIN13_W<20> {
140 PIN13_W::new(self)
141 }
142 #[doc = "Bits 24:27 - PIN14 field"]
143 #[inline(always)]
144 pub fn pin14(&mut self) -> PIN14_W<24> {
145 PIN14_W::new(self)
146 }
147 #[doc = "Bits 28:31 - PIN15 field"]
148 #[inline(always)]
149 pub fn pin15(&mut self) -> PIN15_W<28> {
150 PIN15_W::new(self)
151 }
152 #[doc = "Writes raw bits to the register."]
153 #[inline(always)]
154 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
155 self.0.bits(bits);
156 self
157 }
158}
159#[doc = "FUNC1 register\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 [func1](index.html) module"]
160pub struct FUNC1_SPEC;
161impl crate::RegisterSpec for FUNC1_SPEC {
162 type Ux = u32;
163}
164#[doc = "`read()` method returns [func1::R](R) reader structure"]
165impl crate::Readable for FUNC1_SPEC {
166 type Reader = R;
167}
168#[doc = "`write(|w| ..)` method takes [func1::W](W) writer structure"]
169impl crate::Writable for FUNC1_SPEC {
170 type Writer = W;
171}
172#[doc = "`reset()` method sets FUNC1 to value 0"]
173impl crate::Resettable for FUNC1_SPEC {
174 #[inline(always)]
175 fn reset_value() -> Self::Ux {
176 0
177 }
178}