msp432e4/sysctl/
memtim0.rs

1#[doc = r"Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r"Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::MEMTIM0 {
10    #[doc = r"Modifies the contents of the register"]
11    #[inline(always)]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        self.register.set(f(&R { bits }, &mut W { bits }).bits);
18    }
19    #[doc = r"Reads the contents of the register"]
20    #[inline(always)]
21    pub fn read(&self) -> R {
22        R {
23            bits: self.register.get(),
24        }
25    }
26    #[doc = r"Writes to the register"]
27    #[inline(always)]
28    pub fn write<F>(&self, f: F)
29    where
30        F: FnOnce(&mut W) -> &mut W,
31    {
32        self.register.set(
33            f(&mut W {
34                bits: Self::reset_value(),
35            })
36            .bits,
37        );
38    }
39    #[doc = r"Reset value of the register"]
40    #[inline(always)]
41    pub const fn reset_value() -> u32 {
42        0
43    }
44    #[doc = r"Writes the reset value to the register"]
45    #[inline(always)]
46    pub fn reset(&self) {
47        self.register.set(Self::reset_value())
48    }
49}
50#[doc = r"Value of the field"]
51pub struct SYSCTL_MEMTIM0_FWSR {
52    bits: u8,
53}
54impl SYSCTL_MEMTIM0_FWSR {
55    #[doc = r"Value of the field as raw bits"]
56    #[inline(always)]
57    pub fn bits(&self) -> u8 {
58        self.bits
59    }
60}
61#[doc = r"Proxy"]
62pub struct _SYSCTL_MEMTIM0_FWSW<'a> {
63    w: &'a mut W,
64}
65impl<'a> _SYSCTL_MEMTIM0_FWSW<'a> {
66    #[doc = r"Writes raw bits to the field"]
67    #[inline(always)]
68    pub unsafe fn bits(self, value: u8) -> &'a mut W {
69        self.w.bits &= !(15 << 0);
70        self.w.bits |= ((value as u32) & 15) << 0;
71        self.w
72    }
73}
74#[doc = r"Value of the field"]
75pub struct RESERVED0R {
76    bits: bool,
77}
78impl RESERVED0R {
79    #[doc = r"Value of the field as raw bits"]
80    #[inline(always)]
81    pub fn bit(&self) -> bool {
82        self.bits
83    }
84    #[doc = r"Returns `true` if the bit is clear (0)"]
85    #[inline(always)]
86    pub fn bit_is_clear(&self) -> bool {
87        !self.bit()
88    }
89    #[doc = r"Returns `true` if the bit is set (1)"]
90    #[inline(always)]
91    pub fn bit_is_set(&self) -> bool {
92        self.bit()
93    }
94}
95#[doc = r"Proxy"]
96pub struct _RESERVED0W<'a> {
97    w: &'a mut W,
98}
99impl<'a> _RESERVED0W<'a> {
100    #[doc = r"Sets the field bit"]
101    #[inline(always)]
102    pub fn set_bit(self) -> &'a mut W {
103        self.bit(true)
104    }
105    #[doc = r"Clears the field bit"]
106    #[inline(always)]
107    pub fn clear_bit(self) -> &'a mut W {
108        self.bit(false)
109    }
110    #[doc = r"Writes raw bits to the field"]
111    #[inline(always)]
112    pub fn bit(self, value: bool) -> &'a mut W {
113        self.w.bits &= !(1 << 4);
114        self.w.bits |= ((value as u32) & 1) << 4;
115        self.w
116    }
117}
118#[doc = r"Value of the field"]
119pub struct SYSCTL_MEMTIM0_FBCER {
120    bits: bool,
121}
122impl SYSCTL_MEMTIM0_FBCER {
123    #[doc = r"Value of the field as raw bits"]
124    #[inline(always)]
125    pub fn bit(&self) -> bool {
126        self.bits
127    }
128    #[doc = r"Returns `true` if the bit is clear (0)"]
129    #[inline(always)]
130    pub fn bit_is_clear(&self) -> bool {
131        !self.bit()
132    }
133    #[doc = r"Returns `true` if the bit is set (1)"]
134    #[inline(always)]
135    pub fn bit_is_set(&self) -> bool {
136        self.bit()
137    }
138}
139#[doc = r"Proxy"]
140pub struct _SYSCTL_MEMTIM0_FBCEW<'a> {
141    w: &'a mut W,
142}
143impl<'a> _SYSCTL_MEMTIM0_FBCEW<'a> {
144    #[doc = r"Sets the field bit"]
145    #[inline(always)]
146    pub fn set_bit(self) -> &'a mut W {
147        self.bit(true)
148    }
149    #[doc = r"Clears the field bit"]
150    #[inline(always)]
151    pub fn clear_bit(self) -> &'a mut W {
152        self.bit(false)
153    }
154    #[doc = r"Writes raw bits to the field"]
155    #[inline(always)]
156    pub fn bit(self, value: bool) -> &'a mut W {
157        self.w.bits &= !(1 << 5);
158        self.w.bits |= ((value as u32) & 1) << 5;
159        self.w
160    }
161}
162#[doc = "Possible values of the field `SYSCTL_MEMTIM0_FBCHT`"]
163#[derive(Clone, Copy, Debug, PartialEq)]
164pub enum SYSCTL_MEMTIM0_FBCHTR {
165    #[doc = "1/2 system clock period"]
166    SYSCTL_MEMTIM0_FBCHT_0_5,
167    #[doc = "1 system clock period"]
168    SYSCTL_MEMTIM0_FBCHT_1,
169    #[doc = "1.5 system clock periods"]
170    SYSCTL_MEMTIM0_FBCHT_1_5,
171    #[doc = "2 system clock periods"]
172    SYSCTL_MEMTIM0_FBCHT_2,
173    #[doc = "2.5 system clock periods"]
174    SYSCTL_MEMTIM0_FBCHT_2_5,
175    #[doc = "3 system clock periods"]
176    SYSCTL_MEMTIM0_FBCHT_3,
177    #[doc = "3.5 system clock periods"]
178    SYSCTL_MEMTIM0_FBCHT_3_5,
179    #[doc = "4 system clock periods"]
180    SYSCTL_MEMTIM0_FBCHT_4,
181    #[doc = "4.5 system clock periods"]
182    SYSCTL_MEMTIM0_FBCHT_4_5,
183    #[doc = r"Reserved"]
184    _Reserved(u8),
185}
186impl SYSCTL_MEMTIM0_FBCHTR {
187    #[doc = r"Value of the field as raw bits"]
188    #[inline(always)]
189    pub fn bits(&self) -> u8 {
190        match *self {
191            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_0_5 => 0,
192            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1 => 1,
193            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1_5 => 2,
194            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2 => 3,
195            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2_5 => 4,
196            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3 => 5,
197            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3_5 => 6,
198            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4 => 7,
199            SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4_5 => 8,
200            SYSCTL_MEMTIM0_FBCHTR::_Reserved(bits) => bits,
201        }
202    }
203    #[allow(missing_docs)]
204    #[doc(hidden)]
205    #[inline(always)]
206    pub fn _from(value: u8) -> SYSCTL_MEMTIM0_FBCHTR {
207        match value {
208            0 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_0_5,
209            1 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1,
210            2 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1_5,
211            3 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2,
212            4 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2_5,
213            5 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3,
214            6 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3_5,
215            7 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4,
216            8 => SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4_5,
217            i => SYSCTL_MEMTIM0_FBCHTR::_Reserved(i),
218        }
219    }
220    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_0_5`"]
221    #[inline(always)]
222    pub fn is_sysctl_memtim0_fbcht_0_5(&self) -> bool {
223        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_0_5
224    }
225    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_1`"]
226    #[inline(always)]
227    pub fn is_sysctl_memtim0_fbcht_1(&self) -> bool {
228        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1
229    }
230    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_1_5`"]
231    #[inline(always)]
232    pub fn is_sysctl_memtim0_fbcht_1_5(&self) -> bool {
233        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_1_5
234    }
235    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_2`"]
236    #[inline(always)]
237    pub fn is_sysctl_memtim0_fbcht_2(&self) -> bool {
238        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2
239    }
240    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_2_5`"]
241    #[inline(always)]
242    pub fn is_sysctl_memtim0_fbcht_2_5(&self) -> bool {
243        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_2_5
244    }
245    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_3`"]
246    #[inline(always)]
247    pub fn is_sysctl_memtim0_fbcht_3(&self) -> bool {
248        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3
249    }
250    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_3_5`"]
251    #[inline(always)]
252    pub fn is_sysctl_memtim0_fbcht_3_5(&self) -> bool {
253        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_3_5
254    }
255    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_4`"]
256    #[inline(always)]
257    pub fn is_sysctl_memtim0_fbcht_4(&self) -> bool {
258        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4
259    }
260    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_FBCHT_4_5`"]
261    #[inline(always)]
262    pub fn is_sysctl_memtim0_fbcht_4_5(&self) -> bool {
263        *self == SYSCTL_MEMTIM0_FBCHTR::SYSCTL_MEMTIM0_FBCHT_4_5
264    }
265}
266#[doc = "Values that can be written to the field `SYSCTL_MEMTIM0_FBCHT`"]
267#[derive(Clone, Copy, Debug, PartialEq)]
268pub enum SYSCTL_MEMTIM0_FBCHTW {
269    #[doc = "1/2 system clock period"]
270    SYSCTL_MEMTIM0_FBCHT_0_5,
271    #[doc = "1 system clock period"]
272    SYSCTL_MEMTIM0_FBCHT_1,
273    #[doc = "1.5 system clock periods"]
274    SYSCTL_MEMTIM0_FBCHT_1_5,
275    #[doc = "2 system clock periods"]
276    SYSCTL_MEMTIM0_FBCHT_2,
277    #[doc = "2.5 system clock periods"]
278    SYSCTL_MEMTIM0_FBCHT_2_5,
279    #[doc = "3 system clock periods"]
280    SYSCTL_MEMTIM0_FBCHT_3,
281    #[doc = "3.5 system clock periods"]
282    SYSCTL_MEMTIM0_FBCHT_3_5,
283    #[doc = "4 system clock periods"]
284    SYSCTL_MEMTIM0_FBCHT_4,
285    #[doc = "4.5 system clock periods"]
286    SYSCTL_MEMTIM0_FBCHT_4_5,
287}
288impl SYSCTL_MEMTIM0_FBCHTW {
289    #[allow(missing_docs)]
290    #[doc(hidden)]
291    #[inline(always)]
292    pub fn _bits(&self) -> u8 {
293        match *self {
294            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_0_5 => 0,
295            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_1 => 1,
296            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_1_5 => 2,
297            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_2 => 3,
298            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_2_5 => 4,
299            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_3 => 5,
300            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_3_5 => 6,
301            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_4 => 7,
302            SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_4_5 => 8,
303        }
304    }
305}
306#[doc = r"Proxy"]
307pub struct _SYSCTL_MEMTIM0_FBCHTW<'a> {
308    w: &'a mut W,
309}
310impl<'a> _SYSCTL_MEMTIM0_FBCHTW<'a> {
311    #[doc = r"Writes `variant` to the field"]
312    #[inline(always)]
313    pub fn variant(self, variant: SYSCTL_MEMTIM0_FBCHTW) -> &'a mut W {
314        unsafe { self.bits(variant._bits()) }
315    }
316    #[doc = "1/2 system clock period"]
317    #[inline(always)]
318    pub fn sysctl_memtim0_fbcht_0_5(self) -> &'a mut W {
319        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_0_5)
320    }
321    #[doc = "1 system clock period"]
322    #[inline(always)]
323    pub fn sysctl_memtim0_fbcht_1(self) -> &'a mut W {
324        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_1)
325    }
326    #[doc = "1.5 system clock periods"]
327    #[inline(always)]
328    pub fn sysctl_memtim0_fbcht_1_5(self) -> &'a mut W {
329        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_1_5)
330    }
331    #[doc = "2 system clock periods"]
332    #[inline(always)]
333    pub fn sysctl_memtim0_fbcht_2(self) -> &'a mut W {
334        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_2)
335    }
336    #[doc = "2.5 system clock periods"]
337    #[inline(always)]
338    pub fn sysctl_memtim0_fbcht_2_5(self) -> &'a mut W {
339        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_2_5)
340    }
341    #[doc = "3 system clock periods"]
342    #[inline(always)]
343    pub fn sysctl_memtim0_fbcht_3(self) -> &'a mut W {
344        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_3)
345    }
346    #[doc = "3.5 system clock periods"]
347    #[inline(always)]
348    pub fn sysctl_memtim0_fbcht_3_5(self) -> &'a mut W {
349        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_3_5)
350    }
351    #[doc = "4 system clock periods"]
352    #[inline(always)]
353    pub fn sysctl_memtim0_fbcht_4(self) -> &'a mut W {
354        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_4)
355    }
356    #[doc = "4.5 system clock periods"]
357    #[inline(always)]
358    pub fn sysctl_memtim0_fbcht_4_5(self) -> &'a mut W {
359        self.variant(SYSCTL_MEMTIM0_FBCHTW::SYSCTL_MEMTIM0_FBCHT_4_5)
360    }
361    #[doc = r"Writes raw bits to the field"]
362    #[inline(always)]
363    pub unsafe fn bits(self, value: u8) -> &'a mut W {
364        self.w.bits &= !(15 << 6);
365        self.w.bits |= ((value as u32) & 15) << 6;
366        self.w
367    }
368}
369#[doc = r"Value of the field"]
370pub struct SYSCTL_MEMTIM0_EWSR {
371    bits: u8,
372}
373impl SYSCTL_MEMTIM0_EWSR {
374    #[doc = r"Value of the field as raw bits"]
375    #[inline(always)]
376    pub fn bits(&self) -> u8 {
377        self.bits
378    }
379}
380#[doc = r"Proxy"]
381pub struct _SYSCTL_MEMTIM0_EWSW<'a> {
382    w: &'a mut W,
383}
384impl<'a> _SYSCTL_MEMTIM0_EWSW<'a> {
385    #[doc = r"Writes raw bits to the field"]
386    #[inline(always)]
387    pub unsafe fn bits(self, value: u8) -> &'a mut W {
388        self.w.bits &= !(15 << 16);
389        self.w.bits |= ((value as u32) & 15) << 16;
390        self.w
391    }
392}
393#[doc = r"Value of the field"]
394pub struct RESERVED1R {
395    bits: bool,
396}
397impl RESERVED1R {
398    #[doc = r"Value of the field as raw bits"]
399    #[inline(always)]
400    pub fn bit(&self) -> bool {
401        self.bits
402    }
403    #[doc = r"Returns `true` if the bit is clear (0)"]
404    #[inline(always)]
405    pub fn bit_is_clear(&self) -> bool {
406        !self.bit()
407    }
408    #[doc = r"Returns `true` if the bit is set (1)"]
409    #[inline(always)]
410    pub fn bit_is_set(&self) -> bool {
411        self.bit()
412    }
413}
414#[doc = r"Proxy"]
415pub struct _RESERVED1W<'a> {
416    w: &'a mut W,
417}
418impl<'a> _RESERVED1W<'a> {
419    #[doc = r"Sets the field bit"]
420    #[inline(always)]
421    pub fn set_bit(self) -> &'a mut W {
422        self.bit(true)
423    }
424    #[doc = r"Clears the field bit"]
425    #[inline(always)]
426    pub fn clear_bit(self) -> &'a mut W {
427        self.bit(false)
428    }
429    #[doc = r"Writes raw bits to the field"]
430    #[inline(always)]
431    pub fn bit(self, value: bool) -> &'a mut W {
432        self.w.bits &= !(1 << 20);
433        self.w.bits |= ((value as u32) & 1) << 20;
434        self.w
435    }
436}
437#[doc = r"Value of the field"]
438pub struct SYSCTL_MEMTIM0_EBCER {
439    bits: bool,
440}
441impl SYSCTL_MEMTIM0_EBCER {
442    #[doc = r"Value of the field as raw bits"]
443    #[inline(always)]
444    pub fn bit(&self) -> bool {
445        self.bits
446    }
447    #[doc = r"Returns `true` if the bit is clear (0)"]
448    #[inline(always)]
449    pub fn bit_is_clear(&self) -> bool {
450        !self.bit()
451    }
452    #[doc = r"Returns `true` if the bit is set (1)"]
453    #[inline(always)]
454    pub fn bit_is_set(&self) -> bool {
455        self.bit()
456    }
457}
458#[doc = r"Proxy"]
459pub struct _SYSCTL_MEMTIM0_EBCEW<'a> {
460    w: &'a mut W,
461}
462impl<'a> _SYSCTL_MEMTIM0_EBCEW<'a> {
463    #[doc = r"Sets the field bit"]
464    #[inline(always)]
465    pub fn set_bit(self) -> &'a mut W {
466        self.bit(true)
467    }
468    #[doc = r"Clears the field bit"]
469    #[inline(always)]
470    pub fn clear_bit(self) -> &'a mut W {
471        self.bit(false)
472    }
473    #[doc = r"Writes raw bits to the field"]
474    #[inline(always)]
475    pub fn bit(self, value: bool) -> &'a mut W {
476        self.w.bits &= !(1 << 21);
477        self.w.bits |= ((value as u32) & 1) << 21;
478        self.w
479    }
480}
481#[doc = "Possible values of the field `SYSCTL_MEMTIM0_EBCHT`"]
482#[derive(Clone, Copy, Debug, PartialEq)]
483pub enum SYSCTL_MEMTIM0_EBCHTR {
484    #[doc = "1/2 system clock period"]
485    SYSCTL_MEMTIM0_EBCHT_0_5,
486    #[doc = "1 system clock period"]
487    SYSCTL_MEMTIM0_EBCHT_1,
488    #[doc = "1.5 system clock periods"]
489    SYSCTL_MEMTIM0_EBCHT_1_5,
490    #[doc = "2 system clock periods"]
491    SYSCTL_MEMTIM0_EBCHT_2,
492    #[doc = "2.5 system clock periods"]
493    SYSCTL_MEMTIM0_EBCHT_2_5,
494    #[doc = "3 system clock periods"]
495    SYSCTL_MEMTIM0_EBCHT_3,
496    #[doc = "3.5 system clock periods"]
497    SYSCTL_MEMTIM0_EBCHT_3_5,
498    #[doc = "4 system clock periods"]
499    SYSCTL_MEMTIM0_EBCHT_4,
500    #[doc = "4.5 system clock periods"]
501    SYSCTL_MEMTIM0_EBCHT_4_5,
502    #[doc = r"Reserved"]
503    _Reserved(u8),
504}
505impl SYSCTL_MEMTIM0_EBCHTR {
506    #[doc = r"Value of the field as raw bits"]
507    #[inline(always)]
508    pub fn bits(&self) -> u8 {
509        match *self {
510            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_0_5 => 0,
511            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1 => 1,
512            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1_5 => 2,
513            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2 => 3,
514            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2_5 => 4,
515            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3 => 5,
516            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3_5 => 6,
517            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4 => 7,
518            SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4_5 => 8,
519            SYSCTL_MEMTIM0_EBCHTR::_Reserved(bits) => bits,
520        }
521    }
522    #[allow(missing_docs)]
523    #[doc(hidden)]
524    #[inline(always)]
525    pub fn _from(value: u8) -> SYSCTL_MEMTIM0_EBCHTR {
526        match value {
527            0 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_0_5,
528            1 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1,
529            2 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1_5,
530            3 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2,
531            4 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2_5,
532            5 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3,
533            6 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3_5,
534            7 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4,
535            8 => SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4_5,
536            i => SYSCTL_MEMTIM0_EBCHTR::_Reserved(i),
537        }
538    }
539    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_0_5`"]
540    #[inline(always)]
541    pub fn is_sysctl_memtim0_ebcht_0_5(&self) -> bool {
542        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_0_5
543    }
544    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_1`"]
545    #[inline(always)]
546    pub fn is_sysctl_memtim0_ebcht_1(&self) -> bool {
547        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1
548    }
549    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_1_5`"]
550    #[inline(always)]
551    pub fn is_sysctl_memtim0_ebcht_1_5(&self) -> bool {
552        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_1_5
553    }
554    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_2`"]
555    #[inline(always)]
556    pub fn is_sysctl_memtim0_ebcht_2(&self) -> bool {
557        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2
558    }
559    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_2_5`"]
560    #[inline(always)]
561    pub fn is_sysctl_memtim0_ebcht_2_5(&self) -> bool {
562        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_2_5
563    }
564    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_3`"]
565    #[inline(always)]
566    pub fn is_sysctl_memtim0_ebcht_3(&self) -> bool {
567        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3
568    }
569    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_3_5`"]
570    #[inline(always)]
571    pub fn is_sysctl_memtim0_ebcht_3_5(&self) -> bool {
572        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_3_5
573    }
574    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_4`"]
575    #[inline(always)]
576    pub fn is_sysctl_memtim0_ebcht_4(&self) -> bool {
577        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4
578    }
579    #[doc = "Checks if the value of the field is `SYSCTL_MEMTIM0_EBCHT_4_5`"]
580    #[inline(always)]
581    pub fn is_sysctl_memtim0_ebcht_4_5(&self) -> bool {
582        *self == SYSCTL_MEMTIM0_EBCHTR::SYSCTL_MEMTIM0_EBCHT_4_5
583    }
584}
585#[doc = "Values that can be written to the field `SYSCTL_MEMTIM0_EBCHT`"]
586#[derive(Clone, Copy, Debug, PartialEq)]
587pub enum SYSCTL_MEMTIM0_EBCHTW {
588    #[doc = "1/2 system clock period"]
589    SYSCTL_MEMTIM0_EBCHT_0_5,
590    #[doc = "1 system clock period"]
591    SYSCTL_MEMTIM0_EBCHT_1,
592    #[doc = "1.5 system clock periods"]
593    SYSCTL_MEMTIM0_EBCHT_1_5,
594    #[doc = "2 system clock periods"]
595    SYSCTL_MEMTIM0_EBCHT_2,
596    #[doc = "2.5 system clock periods"]
597    SYSCTL_MEMTIM0_EBCHT_2_5,
598    #[doc = "3 system clock periods"]
599    SYSCTL_MEMTIM0_EBCHT_3,
600    #[doc = "3.5 system clock periods"]
601    SYSCTL_MEMTIM0_EBCHT_3_5,
602    #[doc = "4 system clock periods"]
603    SYSCTL_MEMTIM0_EBCHT_4,
604    #[doc = "4.5 system clock periods"]
605    SYSCTL_MEMTIM0_EBCHT_4_5,
606}
607impl SYSCTL_MEMTIM0_EBCHTW {
608    #[allow(missing_docs)]
609    #[doc(hidden)]
610    #[inline(always)]
611    pub fn _bits(&self) -> u8 {
612        match *self {
613            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_0_5 => 0,
614            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_1 => 1,
615            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_1_5 => 2,
616            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_2 => 3,
617            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_2_5 => 4,
618            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_3 => 5,
619            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_3_5 => 6,
620            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_4 => 7,
621            SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_4_5 => 8,
622        }
623    }
624}
625#[doc = r"Proxy"]
626pub struct _SYSCTL_MEMTIM0_EBCHTW<'a> {
627    w: &'a mut W,
628}
629impl<'a> _SYSCTL_MEMTIM0_EBCHTW<'a> {
630    #[doc = r"Writes `variant` to the field"]
631    #[inline(always)]
632    pub fn variant(self, variant: SYSCTL_MEMTIM0_EBCHTW) -> &'a mut W {
633        unsafe { self.bits(variant._bits()) }
634    }
635    #[doc = "1/2 system clock period"]
636    #[inline(always)]
637    pub fn sysctl_memtim0_ebcht_0_5(self) -> &'a mut W {
638        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_0_5)
639    }
640    #[doc = "1 system clock period"]
641    #[inline(always)]
642    pub fn sysctl_memtim0_ebcht_1(self) -> &'a mut W {
643        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_1)
644    }
645    #[doc = "1.5 system clock periods"]
646    #[inline(always)]
647    pub fn sysctl_memtim0_ebcht_1_5(self) -> &'a mut W {
648        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_1_5)
649    }
650    #[doc = "2 system clock periods"]
651    #[inline(always)]
652    pub fn sysctl_memtim0_ebcht_2(self) -> &'a mut W {
653        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_2)
654    }
655    #[doc = "2.5 system clock periods"]
656    #[inline(always)]
657    pub fn sysctl_memtim0_ebcht_2_5(self) -> &'a mut W {
658        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_2_5)
659    }
660    #[doc = "3 system clock periods"]
661    #[inline(always)]
662    pub fn sysctl_memtim0_ebcht_3(self) -> &'a mut W {
663        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_3)
664    }
665    #[doc = "3.5 system clock periods"]
666    #[inline(always)]
667    pub fn sysctl_memtim0_ebcht_3_5(self) -> &'a mut W {
668        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_3_5)
669    }
670    #[doc = "4 system clock periods"]
671    #[inline(always)]
672    pub fn sysctl_memtim0_ebcht_4(self) -> &'a mut W {
673        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_4)
674    }
675    #[doc = "4.5 system clock periods"]
676    #[inline(always)]
677    pub fn sysctl_memtim0_ebcht_4_5(self) -> &'a mut W {
678        self.variant(SYSCTL_MEMTIM0_EBCHTW::SYSCTL_MEMTIM0_EBCHT_4_5)
679    }
680    #[doc = r"Writes raw bits to the field"]
681    #[inline(always)]
682    pub unsafe fn bits(self, value: u8) -> &'a mut W {
683        self.w.bits &= !(15 << 22);
684        self.w.bits |= ((value as u32) & 15) << 22;
685        self.w
686    }
687}
688impl R {
689    #[doc = r"Value of the register as raw bits"]
690    #[inline(always)]
691    pub fn bits(&self) -> u32 {
692        self.bits
693    }
694    #[doc = "Bits 0:3 - Flash Wait State"]
695    #[inline(always)]
696    pub fn sysctl_memtim0_fws(&self) -> SYSCTL_MEMTIM0_FWSR {
697        let bits = ((self.bits >> 0) & 15) as u8;
698        SYSCTL_MEMTIM0_FWSR { bits }
699    }
700    #[doc = "Bit 4 - Value of this reserved bit must be read as 1"]
701    #[inline(always)]
702    pub fn reserved0(&self) -> RESERVED0R {
703        let bits = ((self.bits >> 4) & 1) != 0;
704        RESERVED0R { bits }
705    }
706    #[doc = "Bit 5 - Flash Bank Clock Edge"]
707    #[inline(always)]
708    pub fn sysctl_memtim0_fbce(&self) -> SYSCTL_MEMTIM0_FBCER {
709        let bits = ((self.bits >> 5) & 1) != 0;
710        SYSCTL_MEMTIM0_FBCER { bits }
711    }
712    #[doc = "Bits 6:9 - Flash Bank Clock High Time"]
713    #[inline(always)]
714    pub fn sysctl_memtim0_fbcht(&self) -> SYSCTL_MEMTIM0_FBCHTR {
715        SYSCTL_MEMTIM0_FBCHTR::_from(((self.bits >> 6) & 15) as u8)
716    }
717    #[doc = "Bits 16:19 - EEPROM Wait States"]
718    #[inline(always)]
719    pub fn sysctl_memtim0_ews(&self) -> SYSCTL_MEMTIM0_EWSR {
720        let bits = ((self.bits >> 16) & 15) as u8;
721        SYSCTL_MEMTIM0_EWSR { bits }
722    }
723    #[doc = "Bit 20 - Value of this reserved bit must be read as 1"]
724    #[inline(always)]
725    pub fn reserved1(&self) -> RESERVED1R {
726        let bits = ((self.bits >> 20) & 1) != 0;
727        RESERVED1R { bits }
728    }
729    #[doc = "Bit 21 - EEPROM Bank Clock Edge"]
730    #[inline(always)]
731    pub fn sysctl_memtim0_ebce(&self) -> SYSCTL_MEMTIM0_EBCER {
732        let bits = ((self.bits >> 21) & 1) != 0;
733        SYSCTL_MEMTIM0_EBCER { bits }
734    }
735    #[doc = "Bits 22:25 - EEPROM Clock High Time"]
736    #[inline(always)]
737    pub fn sysctl_memtim0_ebcht(&self) -> SYSCTL_MEMTIM0_EBCHTR {
738        SYSCTL_MEMTIM0_EBCHTR::_from(((self.bits >> 22) & 15) as u8)
739    }
740}
741impl W {
742    #[doc = r"Writes raw bits to the register"]
743    #[inline(always)]
744    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
745        self.bits = bits;
746        self
747    }
748    #[doc = "Bits 0:3 - Flash Wait State"]
749    #[inline(always)]
750    pub fn sysctl_memtim0_fws(&mut self) -> _SYSCTL_MEMTIM0_FWSW {
751        _SYSCTL_MEMTIM0_FWSW { w: self }
752    }
753    #[doc = "Bit 4 - Value of this reserved bit must be read as 1"]
754    #[inline(always)]
755    pub fn reserved0(&mut self) -> _RESERVED0W {
756        _RESERVED0W { w: self }
757    }
758    #[doc = "Bit 5 - Flash Bank Clock Edge"]
759    #[inline(always)]
760    pub fn sysctl_memtim0_fbce(&mut self) -> _SYSCTL_MEMTIM0_FBCEW {
761        _SYSCTL_MEMTIM0_FBCEW { w: self }
762    }
763    #[doc = "Bits 6:9 - Flash Bank Clock High Time"]
764    #[inline(always)]
765    pub fn sysctl_memtim0_fbcht(&mut self) -> _SYSCTL_MEMTIM0_FBCHTW {
766        _SYSCTL_MEMTIM0_FBCHTW { w: self }
767    }
768    #[doc = "Bits 16:19 - EEPROM Wait States"]
769    #[inline(always)]
770    pub fn sysctl_memtim0_ews(&mut self) -> _SYSCTL_MEMTIM0_EWSW {
771        _SYSCTL_MEMTIM0_EWSW { w: self }
772    }
773    #[doc = "Bit 20 - Value of this reserved bit must be read as 1"]
774    #[inline(always)]
775    pub fn reserved1(&mut self) -> _RESERVED1W {
776        _RESERVED1W { w: self }
777    }
778    #[doc = "Bit 21 - EEPROM Bank Clock Edge"]
779    #[inline(always)]
780    pub fn sysctl_memtim0_ebce(&mut self) -> _SYSCTL_MEMTIM0_EBCEW {
781        _SYSCTL_MEMTIM0_EBCEW { w: self }
782    }
783    #[doc = "Bits 22:25 - EEPROM Clock High Time"]
784    #[inline(always)]
785    pub fn sysctl_memtim0_ebcht(&mut self) -> _SYSCTL_MEMTIM0_EBCHTW {
786        _SYSCTL_MEMTIM0_EBCHTW { w: self }
787    }
788}