1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#[doc = "Register `AFIO_GPECFGHR` reader"]
pub struct R(crate::R<AFIO_GPECFGHR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<AFIO_GPECFGHR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<AFIO_GPECFGHR_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<AFIO_GPECFGHR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `AFIO_GPECFGHR` writer"]
pub struct W(crate::W<AFIO_GPECFGHR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<AFIO_GPECFGHR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<AFIO_GPECFGHR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<AFIO_GPECFGHR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `PECFG8` reader - PECFG8"]
pub type PECFG8_R = crate::FieldReader;
#[doc = "Field `PECFG8` writer - PECFG8"]
pub type PECFG8_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG9` reader - PECFG9"]
pub type PECFG9_R = crate::FieldReader;
#[doc = "Field `PECFG9` writer - PECFG9"]
pub type PECFG9_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG10` reader - PECFG10"]
pub type PECFG10_R = crate::FieldReader;
#[doc = "Field `PECFG10` writer - PECFG10"]
pub type PECFG10_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG11` reader - PECFG11"]
pub type PECFG11_R = crate::FieldReader;
#[doc = "Field `PECFG11` writer - PECFG11"]
pub type PECFG11_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG12` reader - PECFG12"]
pub type PECFG12_R = crate::FieldReader;
#[doc = "Field `PECFG12` writer - PECFG12"]
pub type PECFG12_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG13` reader - PECFG13"]
pub type PECFG13_R = crate::FieldReader;
#[doc = "Field `PECFG13` writer - PECFG13"]
pub type PECFG13_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG14` reader - PECFG14"]
pub type PECFG14_R = crate::FieldReader;
#[doc = "Field `PECFG14` writer - PECFG14"]
pub type PECFG14_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
#[doc = "Field `PECFG15` reader - PECFG15"]
pub type PECFG15_R = crate::FieldReader;
#[doc = "Field `PECFG15` writer - PECFG15"]
pub type PECFG15_W<'a, const O: u8> = crate::FieldWriter<'a, AFIO_GPECFGHR_SPEC, 4, O>;
impl R {
    #[doc = "Bits 0:3 - PECFG8"]
    #[inline(always)]
    pub fn pecfg8(&self) -> PECFG8_R {
        PECFG8_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:7 - PECFG9"]
    #[inline(always)]
    pub fn pecfg9(&self) -> PECFG9_R {
        PECFG9_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
    #[doc = "Bits 8:11 - PECFG10"]
    #[inline(always)]
    pub fn pecfg10(&self) -> PECFG10_R {
        PECFG10_R::new(((self.bits >> 8) & 0x0f) as u8)
    }
    #[doc = "Bits 12:15 - PECFG11"]
    #[inline(always)]
    pub fn pecfg11(&self) -> PECFG11_R {
        PECFG11_R::new(((self.bits >> 12) & 0x0f) as u8)
    }
    #[doc = "Bits 16:19 - PECFG12"]
    #[inline(always)]
    pub fn pecfg12(&self) -> PECFG12_R {
        PECFG12_R::new(((self.bits >> 16) & 0x0f) as u8)
    }
    #[doc = "Bits 20:23 - PECFG13"]
    #[inline(always)]
    pub fn pecfg13(&self) -> PECFG13_R {
        PECFG13_R::new(((self.bits >> 20) & 0x0f) as u8)
    }
    #[doc = "Bits 24:27 - PECFG14"]
    #[inline(always)]
    pub fn pecfg14(&self) -> PECFG14_R {
        PECFG14_R::new(((self.bits >> 24) & 0x0f) as u8)
    }
    #[doc = "Bits 28:31 - PECFG15"]
    #[inline(always)]
    pub fn pecfg15(&self) -> PECFG15_R {
        PECFG15_R::new(((self.bits >> 28) & 0x0f) as u8)
    }
}
impl W {
    #[doc = "Bits 0:3 - PECFG8"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg8(&mut self) -> PECFG8_W<0> {
        PECFG8_W::new(self)
    }
    #[doc = "Bits 4:7 - PECFG9"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg9(&mut self) -> PECFG9_W<4> {
        PECFG9_W::new(self)
    }
    #[doc = "Bits 8:11 - PECFG10"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg10(&mut self) -> PECFG10_W<8> {
        PECFG10_W::new(self)
    }
    #[doc = "Bits 12:15 - PECFG11"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg11(&mut self) -> PECFG11_W<12> {
        PECFG11_W::new(self)
    }
    #[doc = "Bits 16:19 - PECFG12"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg12(&mut self) -> PECFG12_W<16> {
        PECFG12_W::new(self)
    }
    #[doc = "Bits 20:23 - PECFG13"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg13(&mut self) -> PECFG13_W<20> {
        PECFG13_W::new(self)
    }
    #[doc = "Bits 24:27 - PECFG14"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg14(&mut self) -> PECFG14_W<24> {
        PECFG14_W::new(self)
    }
    #[doc = "Bits 28:31 - PECFG15"]
    #[inline(always)]
    #[must_use]
    pub fn pecfg15(&mut self) -> PECFG15_W<28> {
        PECFG15_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "AFIO_GPECFGHR\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 [afio_gpecfghr](index.html) module"]
pub struct AFIO_GPECFGHR_SPEC;
impl crate::RegisterSpec for AFIO_GPECFGHR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [afio_gpecfghr::R](R) reader structure"]
impl crate::Readable for AFIO_GPECFGHR_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [afio_gpecfghr::W](W) writer structure"]
impl crate::Writable for AFIO_GPECFGHR_SPEC {
    type Writer = W;
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets AFIO_GPECFGHR to value 0"]
impl crate::Resettable for AFIO_GPECFGHR_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}