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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
#[doc = "Register `ODR` reader"]
pub struct R(crate::R<ODR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<ODR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<ODR_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<ODR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `ODR` writer"]
pub struct W(crate::W<ODR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<ODR_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<ODR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<ODR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD15_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD14_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD13_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD12_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD11_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD10_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD9_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD8_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD7_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD6_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD5_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD4_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD3_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD2_A;
#[doc = "Port output data bit (y = 0..15)"]
pub use OD0_A as OD1_A;
#[doc = "Field `OD15` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD15_R;
#[doc = "Field `OD14` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD14_R;
#[doc = "Field `OD13` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD13_R;
#[doc = "Field `OD12` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD12_R;
#[doc = "Field `OD11` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD11_R;
#[doc = "Field `OD10` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD10_R;
#[doc = "Field `OD9` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD9_R;
#[doc = "Field `OD8` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD8_R;
#[doc = "Field `OD7` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD7_R;
#[doc = "Field `OD6` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD6_R;
#[doc = "Field `OD5` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD5_R;
#[doc = "Field `OD4` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD4_R;
#[doc = "Field `OD3` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD3_R;
#[doc = "Field `OD2` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD2_R;
#[doc = "Field `OD1` reader - Port output data bit (y = 0..15)"]
pub use OD0_R as OD1_R;
#[doc = "Field `OD15` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD15_W;
#[doc = "Field `OD14` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD14_W;
#[doc = "Field `OD13` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD13_W;
#[doc = "Field `OD12` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD12_W;
#[doc = "Field `OD11` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD11_W;
#[doc = "Field `OD10` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD10_W;
#[doc = "Field `OD9` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD9_W;
#[doc = "Field `OD8` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD8_W;
#[doc = "Field `OD7` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD7_W;
#[doc = "Field `OD6` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD6_W;
#[doc = "Field `OD5` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD5_W;
#[doc = "Field `OD4` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD4_W;
#[doc = "Field `OD3` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD3_W;
#[doc = "Field `OD2` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD2_W;
#[doc = "Field `OD1` writer - Port output data bit (y = 0..15)"]
pub use OD0_W as OD1_W;
#[doc = "Port output data bit (y = 0..15)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OD0_A {
    #[doc = "0: Set output to logic low"]
    Low = 0,
    #[doc = "1: Set output to logic high"]
    High = 1,
}
impl From<OD0_A> for bool {
    #[inline(always)]
    fn from(variant: OD0_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OD0` reader - Port output data bit (y = 0..15)"]
pub type OD0_R = crate::BitReader<OD0_A>;
impl OD0_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> OD0_A {
        match self.bits {
            false => OD0_A::Low,
            true => OD0_A::High,
        }
    }
    #[doc = "Checks if the value of the field is `Low`"]
    #[inline(always)]
    pub fn is_low(&self) -> bool {
        *self == OD0_A::Low
    }
    #[doc = "Checks if the value of the field is `High`"]
    #[inline(always)]
    pub fn is_high(&self) -> bool {
        *self == OD0_A::High
    }
}
#[doc = "Field `OD0` writer - Port output data bit (y = 0..15)"]
pub type OD0_W<'a, const O: u8> = crate::BitWriter<'a, u32, ODR_SPEC, OD0_A, O>;
impl<'a, const O: u8> OD0_W<'a, O> {
    #[doc = "Set output to logic low"]
    #[inline(always)]
    pub fn low(self) -> &'a mut W {
        self.variant(OD0_A::Low)
    }
    #[doc = "Set output to logic high"]
    #[inline(always)]
    pub fn high(self) -> &'a mut W {
        self.variant(OD0_A::High)
    }
}
impl R {
    #[doc = "Bit 15 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od15(&self) -> OD15_R {
        OD15_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 14 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od14(&self) -> OD14_R {
        OD14_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 13 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od13(&self) -> OD13_R {
        OD13_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 12 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od12(&self) -> OD12_R {
        OD12_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 11 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od11(&self) -> OD11_R {
        OD11_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 10 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od10(&self) -> OD10_R {
        OD10_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 9 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od9(&self) -> OD9_R {
        OD9_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 8 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od8(&self) -> OD8_R {
        OD8_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 7 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od7(&self) -> OD7_R {
        OD7_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 6 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od6(&self) -> OD6_R {
        OD6_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 5 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od5(&self) -> OD5_R {
        OD5_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 4 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od4(&self) -> OD4_R {
        OD4_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 3 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od3(&self) -> OD3_R {
        OD3_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 2 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od2(&self) -> OD2_R {
        OD2_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 1 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od1(&self) -> OD1_R {
        OD1_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 0 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od0(&self) -> OD0_R {
        OD0_R::new((self.bits & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 15 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od15(&mut self) -> OD15_W<15> {
        OD15_W::new(self)
    }
    #[doc = "Bit 14 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od14(&mut self) -> OD14_W<14> {
        OD14_W::new(self)
    }
    #[doc = "Bit 13 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od13(&mut self) -> OD13_W<13> {
        OD13_W::new(self)
    }
    #[doc = "Bit 12 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od12(&mut self) -> OD12_W<12> {
        OD12_W::new(self)
    }
    #[doc = "Bit 11 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od11(&mut self) -> OD11_W<11> {
        OD11_W::new(self)
    }
    #[doc = "Bit 10 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od10(&mut self) -> OD10_W<10> {
        OD10_W::new(self)
    }
    #[doc = "Bit 9 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od9(&mut self) -> OD9_W<9> {
        OD9_W::new(self)
    }
    #[doc = "Bit 8 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od8(&mut self) -> OD8_W<8> {
        OD8_W::new(self)
    }
    #[doc = "Bit 7 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od7(&mut self) -> OD7_W<7> {
        OD7_W::new(self)
    }
    #[doc = "Bit 6 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od6(&mut self) -> OD6_W<6> {
        OD6_W::new(self)
    }
    #[doc = "Bit 5 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od5(&mut self) -> OD5_W<5> {
        OD5_W::new(self)
    }
    #[doc = "Bit 4 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od4(&mut self) -> OD4_W<4> {
        OD4_W::new(self)
    }
    #[doc = "Bit 3 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od3(&mut self) -> OD3_W<3> {
        OD3_W::new(self)
    }
    #[doc = "Bit 2 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od2(&mut self) -> OD2_W<2> {
        OD2_W::new(self)
    }
    #[doc = "Bit 1 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od1(&mut self) -> OD1_W<1> {
        OD1_W::new(self)
    }
    #[doc = "Bit 0 - Port output data bit (y = 0..15)"]
    #[inline(always)]
    pub fn od0(&mut self) -> OD0_W<0> {
        OD0_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 = "GPIO port output data 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 [odr](index.html) module"]
pub struct ODR_SPEC;
impl crate::RegisterSpec for ODR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [odr::R](R) reader structure"]
impl crate::Readable for ODR_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [odr::W](W) writer structure"]
impl crate::Writable for ODR_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets ODR to value 0"]
impl crate::Resettable for ODR_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}