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
367
368
369
370
371
372
#[doc = "Reader of register ROMSWMAP"]
pub type R = crate::R<u32, super::ROMSWMAP>;
#[doc = "ROM SW Region 0 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW0EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW0EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW0EN_A) -> Self {
        match variant {
            SW0EN_A::NOTVIS => 0,
            SW0EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW0EN`"]
pub type SW0EN_R = crate::R<u8, SW0EN_A>;
impl SW0EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW0EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW0EN_A::NOTVIS),
            1 => Val(SW0EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW0EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW0EN_A::CORE
    }
}
#[doc = "ROM SW Region 1 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW1EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW1EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW1EN_A) -> Self {
        match variant {
            SW1EN_A::NOTVIS => 0,
            SW1EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW1EN`"]
pub type SW1EN_R = crate::R<u8, SW1EN_A>;
impl SW1EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW1EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW1EN_A::NOTVIS),
            1 => Val(SW1EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW1EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW1EN_A::CORE
    }
}
#[doc = "ROM SW Region 2 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW2EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW2EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW2EN_A) -> Self {
        match variant {
            SW2EN_A::NOTVIS => 0,
            SW2EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW2EN`"]
pub type SW2EN_R = crate::R<u8, SW2EN_A>;
impl SW2EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW2EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW2EN_A::NOTVIS),
            1 => Val(SW2EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW2EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW2EN_A::CORE
    }
}
#[doc = "ROM SW Region 3 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW3EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW3EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW3EN_A) -> Self {
        match variant {
            SW3EN_A::NOTVIS => 0,
            SW3EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW3EN`"]
pub type SW3EN_R = crate::R<u8, SW3EN_A>;
impl SW3EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW3EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW3EN_A::NOTVIS),
            1 => Val(SW3EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW3EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW3EN_A::CORE
    }
}
#[doc = "ROM SW Region 4 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW4EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW4EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW4EN_A) -> Self {
        match variant {
            SW4EN_A::NOTVIS => 0,
            SW4EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW4EN`"]
pub type SW4EN_R = crate::R<u8, SW4EN_A>;
impl SW4EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW4EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW4EN_A::NOTVIS),
            1 => Val(SW4EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW4EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW4EN_A::CORE
    }
}
#[doc = "ROM SW Region 5 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW5EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW5EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW5EN_A) -> Self {
        match variant {
            SW5EN_A::NOTVIS => 0,
            SW5EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW5EN`"]
pub type SW5EN_R = crate::R<u8, SW5EN_A>;
impl SW5EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW5EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW5EN_A::NOTVIS),
            1 => Val(SW5EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW5EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW5EN_A::CORE
    }
}
#[doc = "ROM SW Region 6 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW6EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW6EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW6EN_A) -> Self {
        match variant {
            SW6EN_A::NOTVIS => 0,
            SW6EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW6EN`"]
pub type SW6EN_R = crate::R<u8, SW6EN_A>;
impl SW6EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW6EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW6EN_A::NOTVIS),
            1 => Val(SW6EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW6EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW6EN_A::CORE
    }
}
#[doc = "ROM SW Region 7 Availability\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SW7EN_A {
    #[doc = "0: Software region not available to the core"]
    NOTVIS,
    #[doc = "1: Region available to core"]
    CORE,
}
impl From<SW7EN_A> for u8 {
    #[inline(always)]
    fn from(variant: SW7EN_A) -> Self {
        match variant {
            SW7EN_A::NOTVIS => 0,
            SW7EN_A::CORE => 1,
        }
    }
}
#[doc = "Reader of field `SW7EN`"]
pub type SW7EN_R = crate::R<u8, SW7EN_A>;
impl SW7EN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SW7EN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SW7EN_A::NOTVIS),
            1 => Val(SW7EN_A::CORE),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOTVIS`"]
    #[inline(always)]
    pub fn is_notvis(&self) -> bool {
        *self == SW7EN_A::NOTVIS
    }
    #[doc = "Checks if the value of the field is `CORE`"]
    #[inline(always)]
    pub fn is_core(&self) -> bool {
        *self == SW7EN_A::CORE
    }
}
impl R {
    #[doc = "Bits 0:1 - ROM SW Region 0 Availability"]
    #[inline(always)]
    pub fn sw0en(&self) -> SW0EN_R {
        SW0EN_R::new((self.bits & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - ROM SW Region 1 Availability"]
    #[inline(always)]
    pub fn sw1en(&self) -> SW1EN_R {
        SW1EN_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - ROM SW Region 2 Availability"]
    #[inline(always)]
    pub fn sw2en(&self) -> SW2EN_R {
        SW2EN_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - ROM SW Region 3 Availability"]
    #[inline(always)]
    pub fn sw3en(&self) -> SW3EN_R {
        SW3EN_R::new(((self.bits >> 6) & 0x03) as u8)
    }
    #[doc = "Bits 8:9 - ROM SW Region 4 Availability"]
    #[inline(always)]
    pub fn sw4en(&self) -> SW4EN_R {
        SW4EN_R::new(((self.bits >> 8) & 0x03) as u8)
    }
    #[doc = "Bits 10:11 - ROM SW Region 5 Availability"]
    #[inline(always)]
    pub fn sw5en(&self) -> SW5EN_R {
        SW5EN_R::new(((self.bits >> 10) & 0x03) as u8)
    }
    #[doc = "Bits 12:13 - ROM SW Region 6 Availability"]
    #[inline(always)]
    pub fn sw6en(&self) -> SW6EN_R {
        SW6EN_R::new(((self.bits >> 12) & 0x03) as u8)
    }
    #[doc = "Bits 14:15 - ROM SW Region 7 Availability"]
    #[inline(always)]
    pub fn sw7en(&self) -> SW7EN_R {
        SW7EN_R::new(((self.bits >> 14) & 0x03) as u8)
    }
}