mm32f3270_pac/gpioc/
afrh.rs1#[doc = "Register `AFRH` reader"]
2pub struct R(crate::R<AFRH_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<AFRH_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<AFRH_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<AFRH_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `AFRH` writer"]
17pub struct W(crate::W<AFRH_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<AFRH_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<AFRH_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<AFRH_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `AFR8` reader - Multiplexing function selection for bit 8 of portx"]
38pub type AFR8_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `AFR8` writer - Multiplexing function selection for bit 8 of portx"]
40pub type AFR8_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
41#[doc = "Field `AFR9` reader - Multiplexing function selection for bit 9 of portx"]
42pub type AFR9_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `AFR9` writer - Multiplexing function selection for bit 9 of portx"]
44pub type AFR9_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
45#[doc = "Field `AFR10` reader - Multiplexing function selection for bit 10 of portx"]
46pub type AFR10_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `AFR10` writer - Multiplexing function selection for bit 10 of portx"]
48pub type AFR10_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
49#[doc = "Field `AFR11` reader - Multiplexing function selection for bit 11 of portx"]
50pub type AFR11_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `AFR11` writer - Multiplexing function selection for bit 11 of portx"]
52pub type AFR11_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
53#[doc = "Field `AFR12` reader - Multiplexing function selection for bit 12 of portx"]
54pub type AFR12_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `AFR12` writer - Multiplexing function selection for bit 12 of portx"]
56pub type AFR12_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
57#[doc = "Field `AFR13` reader - Multiplexing function selection for bit 13 of portx"]
58pub type AFR13_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `AFR13` writer - Multiplexing function selection for bit 13 of portx"]
60pub type AFR13_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
61#[doc = "Field `AFR14` reader - Multiplexing function selection for bit 14 of portx"]
62pub type AFR14_R = crate::FieldReader<u8, u8>;
63#[doc = "Field `AFR14` writer - Multiplexing function selection for bit 14 of portx"]
64pub type AFR14_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
65#[doc = "Field `AFR15` reader - Multiplexing function selection for bit 15 of portx"]
66pub type AFR15_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `AFR15` writer - Multiplexing function selection for bit 15 of portx"]
68pub type AFR15_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AFRH_SPEC, u8, u8, 4, O>;
69impl R {
70 #[doc = "Bits 0:3 - Multiplexing function selection for bit 8 of portx"]
71 #[inline(always)]
72 pub fn afr8(&self) -> AFR8_R {
73 AFR8_R::new((self.bits & 0x0f) as u8)
74 }
75 #[doc = "Bits 4:7 - Multiplexing function selection for bit 9 of portx"]
76 #[inline(always)]
77 pub fn afr9(&self) -> AFR9_R {
78 AFR9_R::new(((self.bits >> 4) & 0x0f) as u8)
79 }
80 #[doc = "Bits 8:11 - Multiplexing function selection for bit 10 of portx"]
81 #[inline(always)]
82 pub fn afr10(&self) -> AFR10_R {
83 AFR10_R::new(((self.bits >> 8) & 0x0f) as u8)
84 }
85 #[doc = "Bits 12:15 - Multiplexing function selection for bit 11 of portx"]
86 #[inline(always)]
87 pub fn afr11(&self) -> AFR11_R {
88 AFR11_R::new(((self.bits >> 12) & 0x0f) as u8)
89 }
90 #[doc = "Bits 16:19 - Multiplexing function selection for bit 12 of portx"]
91 #[inline(always)]
92 pub fn afr12(&self) -> AFR12_R {
93 AFR12_R::new(((self.bits >> 16) & 0x0f) as u8)
94 }
95 #[doc = "Bits 20:23 - Multiplexing function selection for bit 13 of portx"]
96 #[inline(always)]
97 pub fn afr13(&self) -> AFR13_R {
98 AFR13_R::new(((self.bits >> 20) & 0x0f) as u8)
99 }
100 #[doc = "Bits 24:27 - Multiplexing function selection for bit 14 of portx"]
101 #[inline(always)]
102 pub fn afr14(&self) -> AFR14_R {
103 AFR14_R::new(((self.bits >> 24) & 0x0f) as u8)
104 }
105 #[doc = "Bits 28:31 - Multiplexing function selection for bit 15 of portx"]
106 #[inline(always)]
107 pub fn afr15(&self) -> AFR15_R {
108 AFR15_R::new(((self.bits >> 28) & 0x0f) as u8)
109 }
110}
111impl W {
112 #[doc = "Bits 0:3 - Multiplexing function selection for bit 8 of portx"]
113 #[inline(always)]
114 #[must_use]
115 pub fn afr8(&mut self) -> AFR8_W<0> {
116 AFR8_W::new(self)
117 }
118 #[doc = "Bits 4:7 - Multiplexing function selection for bit 9 of portx"]
119 #[inline(always)]
120 #[must_use]
121 pub fn afr9(&mut self) -> AFR9_W<4> {
122 AFR9_W::new(self)
123 }
124 #[doc = "Bits 8:11 - Multiplexing function selection for bit 10 of portx"]
125 #[inline(always)]
126 #[must_use]
127 pub fn afr10(&mut self) -> AFR10_W<8> {
128 AFR10_W::new(self)
129 }
130 #[doc = "Bits 12:15 - Multiplexing function selection for bit 11 of portx"]
131 #[inline(always)]
132 #[must_use]
133 pub fn afr11(&mut self) -> AFR11_W<12> {
134 AFR11_W::new(self)
135 }
136 #[doc = "Bits 16:19 - Multiplexing function selection for bit 12 of portx"]
137 #[inline(always)]
138 #[must_use]
139 pub fn afr12(&mut self) -> AFR12_W<16> {
140 AFR12_W::new(self)
141 }
142 #[doc = "Bits 20:23 - Multiplexing function selection for bit 13 of portx"]
143 #[inline(always)]
144 #[must_use]
145 pub fn afr13(&mut self) -> AFR13_W<20> {
146 AFR13_W::new(self)
147 }
148 #[doc = "Bits 24:27 - Multiplexing function selection for bit 14 of portx"]
149 #[inline(always)]
150 #[must_use]
151 pub fn afr14(&mut self) -> AFR14_W<24> {
152 AFR14_W::new(self)
153 }
154 #[doc = "Bits 28:31 - Multiplexing function selection for bit 15 of portx"]
155 #[inline(always)]
156 #[must_use]
157 pub fn afr15(&mut self) -> AFR15_W<28> {
158 AFR15_W::new(self)
159 }
160 #[doc = "Writes raw bits to the register."]
161 #[inline(always)]
162 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
163 self.0.bits(bits);
164 self
165 }
166}
167#[doc = "Port Multiplexing Function High 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 [afrh](index.html) module"]
168pub struct AFRH_SPEC;
169impl crate::RegisterSpec for AFRH_SPEC {
170 type Ux = u32;
171}
172#[doc = "`read()` method returns [afrh::R](R) reader structure"]
173impl crate::Readable for AFRH_SPEC {
174 type Reader = R;
175}
176#[doc = "`write(|w| ..)` method takes [afrh::W](W) writer structure"]
177impl crate::Writable for AFRH_SPEC {
178 type Writer = W;
179 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
180 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
181}
182#[doc = "`reset()` method sets AFRH to value 0xffff_ffff"]
183impl crate::Resettable for AFRH_SPEC {
184 const RESET_VALUE: Self::Ux = 0xffff_ffff;
185}