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
#[doc = "Reader of register DID0"]
pub type R = crate::R<u32, super::DID0>;
#[doc = "Minor Revision\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MIN_A {
    #[doc = "0: Initial device, or a major revision update"]
    _0 = 0,
    #[doc = "1: First metal layer change"]
    _1 = 1,
    #[doc = "2: Second metal layer change"]
    _2 = 2,
}
impl From<MIN_A> for u8 {
    #[inline(always)]
    fn from(variant: MIN_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `MIN`"]
pub type MIN_R = crate::R<u8, MIN_A>;
impl MIN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, MIN_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(MIN_A::_0),
            1 => Val(MIN_A::_1),
            2 => Val(MIN_A::_2),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `_0`"]
    #[inline(always)]
    pub fn is_0(&self) -> bool {
        *self == MIN_A::_0
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == MIN_A::_1
    }
    #[doc = "Checks if the value of the field is `_2`"]
    #[inline(always)]
    pub fn is_2(&self) -> bool {
        *self == MIN_A::_2
    }
}
#[doc = "Major Revision\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MAJ_A {
    #[doc = "0: Revision A (initial device)"]
    REVA = 0,
    #[doc = "1: Revision B (first base layer revision)"]
    REVB = 1,
    #[doc = "2: Revision C (second base layer revision)"]
    REVC = 2,
}
impl From<MAJ_A> for u8 {
    #[inline(always)]
    fn from(variant: MAJ_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `MAJ`"]
pub type MAJ_R = crate::R<u8, MAJ_A>;
impl MAJ_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, MAJ_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(MAJ_A::REVA),
            1 => Val(MAJ_A::REVB),
            2 => Val(MAJ_A::REVC),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `REVA`"]
    #[inline(always)]
    pub fn is_reva(&self) -> bool {
        *self == MAJ_A::REVA
    }
    #[doc = "Checks if the value of the field is `REVB`"]
    #[inline(always)]
    pub fn is_revb(&self) -> bool {
        *self == MAJ_A::REVB
    }
    #[doc = "Checks if the value of the field is `REVC`"]
    #[inline(always)]
    pub fn is_revc(&self) -> bool {
        *self == MAJ_A::REVC
    }
}
#[doc = "Device Class\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CLASS_A {
    #[doc = "5: Tiva TM4C123x and TM4E123x microcontrollers"]
    TM4C123 = 5,
}
impl From<CLASS_A> for u8 {
    #[inline(always)]
    fn from(variant: CLASS_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `CLASS`"]
pub type CLASS_R = crate::R<u8, CLASS_A>;
impl CLASS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, CLASS_A> {
        use crate::Variant::*;
        match self.bits {
            5 => Val(CLASS_A::TM4C123),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `TM4C123`"]
    #[inline(always)]
    pub fn is_tm4c123(&self) -> bool {
        *self == CLASS_A::TM4C123
    }
}
#[doc = "DID0 Version\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum VER_A {
    #[doc = "1: Second version of the DID0 register format."]
    _1 = 1,
}
impl From<VER_A> for u8 {
    #[inline(always)]
    fn from(variant: VER_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `VER`"]
pub type VER_R = crate::R<u8, VER_A>;
impl VER_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, VER_A> {
        use crate::Variant::*;
        match self.bits {
            1 => Val(VER_A::_1),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `_1`"]
    #[inline(always)]
    pub fn is_1(&self) -> bool {
        *self == VER_A::_1
    }
}
impl R {
    #[doc = "Bits 0:7 - Minor Revision"]
    #[inline(always)]
    pub fn min(&self) -> MIN_R {
        MIN_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bits 8:15 - Major Revision"]
    #[inline(always)]
    pub fn maj(&self) -> MAJ_R {
        MAJ_R::new(((self.bits >> 8) & 0xff) as u8)
    }
    #[doc = "Bits 16:23 - Device Class"]
    #[inline(always)]
    pub fn class(&self) -> CLASS_R {
        CLASS_R::new(((self.bits >> 16) & 0xff) as u8)
    }
    #[doc = "Bits 28:30 - DID0 Version"]
    #[inline(always)]
    pub fn ver(&self) -> VER_R {
        VER_R::new(((self.bits >> 28) & 0x07) as u8)
    }
}