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
#[doc = "Register `GSTAT` reader"]
pub type R = crate::R<GSTAT_SPEC>;
#[doc = "CC80 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S0I_A {
    #[doc = "0: Running"]
    VALUE1 = 0,
    #[doc = "1: Idle"]
    VALUE2 = 1,
}
impl From<S0I_A> for bool {
    #[inline(always)]
    fn from(variant: S0I_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S0I` reader - CC80 IDLE status"]
pub type S0I_R = crate::BitReader<S0I_A>;
impl S0I_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S0I_A {
        match self.bits {
            false => S0I_A::VALUE1,
            true => S0I_A::VALUE2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S0I_A::VALUE1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S0I_A::VALUE2
    }
}
#[doc = "CC81 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S1I_A {
    #[doc = "0: Running"]
    VALUE1 = 0,
    #[doc = "1: Idle"]
    VALUE2 = 1,
}
impl From<S1I_A> for bool {
    #[inline(always)]
    fn from(variant: S1I_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S1I` reader - CC81 IDLE status"]
pub type S1I_R = crate::BitReader<S1I_A>;
impl S1I_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S1I_A {
        match self.bits {
            false => S1I_A::VALUE1,
            true => S1I_A::VALUE2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S1I_A::VALUE1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S1I_A::VALUE2
    }
}
#[doc = "CC82 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S2I_A {
    #[doc = "0: Running"]
    VALUE1 = 0,
    #[doc = "1: Idle"]
    VALUE2 = 1,
}
impl From<S2I_A> for bool {
    #[inline(always)]
    fn from(variant: S2I_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S2I` reader - CC82 IDLE status"]
pub type S2I_R = crate::BitReader<S2I_A>;
impl S2I_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S2I_A {
        match self.bits {
            false => S2I_A::VALUE1,
            true => S2I_A::VALUE2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S2I_A::VALUE1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S2I_A::VALUE2
    }
}
#[doc = "CC83 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S3I_A {
    #[doc = "0: Running"]
    VALUE1 = 0,
    #[doc = "1: Idle"]
    VALUE2 = 1,
}
impl From<S3I_A> for bool {
    #[inline(always)]
    fn from(variant: S3I_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S3I` reader - CC83 IDLE status"]
pub type S3I_R = crate::BitReader<S3I_A>;
impl S3I_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S3I_A {
        match self.bits {
            false => S3I_A::VALUE1,
            true => S3I_A::VALUE2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S3I_A::VALUE1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S3I_A::VALUE2
    }
}
#[doc = "Prescaler Run Bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PRB_A {
    #[doc = "0: Prescaler is stopped"]
    VALUE1 = 0,
    #[doc = "1: Prescaler is running"]
    VALUE2 = 1,
}
impl From<PRB_A> for bool {
    #[inline(always)]
    fn from(variant: PRB_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PRB` reader - Prescaler Run Bit"]
pub type PRB_R = crate::BitReader<PRB_A>;
impl PRB_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> PRB_A {
        match self.bits {
            false => PRB_A::VALUE1,
            true => PRB_A::VALUE2,
        }
    }
    #[doc = "Prescaler is stopped"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == PRB_A::VALUE1
    }
    #[doc = "Prescaler is running"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == PRB_A::VALUE2
    }
}
#[doc = "Parity Checker Run Bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PCRB_A {
    #[doc = "0: Parity Checker is stopped"]
    VALUE1 = 0,
    #[doc = "1: Parity Checker is running"]
    VALUE2 = 1,
}
impl From<PCRB_A> for bool {
    #[inline(always)]
    fn from(variant: PCRB_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PCRB` reader - Parity Checker Run Bit"]
pub type PCRB_R = crate::BitReader<PCRB_A>;
impl PCRB_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> PCRB_A {
        match self.bits {
            false => PCRB_A::VALUE1,
            true => PCRB_A::VALUE2,
        }
    }
    #[doc = "Parity Checker is stopped"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == PCRB_A::VALUE1
    }
    #[doc = "Parity Checker is running"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == PCRB_A::VALUE2
    }
}
impl R {
    #[doc = "Bit 0 - CC80 IDLE status"]
    #[inline(always)]
    pub fn s0i(&self) -> S0I_R {
        S0I_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - CC81 IDLE status"]
    #[inline(always)]
    pub fn s1i(&self) -> S1I_R {
        S1I_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - CC82 IDLE status"]
    #[inline(always)]
    pub fn s2i(&self) -> S2I_R {
        S2I_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - CC83 IDLE status"]
    #[inline(always)]
    pub fn s3i(&self) -> S3I_R {
        S3I_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 8 - Prescaler Run Bit"]
    #[inline(always)]
    pub fn prb(&self) -> PRB_R {
        PRB_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 10 - Parity Checker Run Bit"]
    #[inline(always)]
    pub fn pcrb(&self) -> PCRB_R {
        PCRB_R::new(((self.bits >> 10) & 1) != 0)
    }
}
#[doc = "Global Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`gstat::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct GSTAT_SPEC;
impl crate::RegisterSpec for GSTAT_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`gstat::R`](R) reader structure"]
impl crate::Readable for GSTAT_SPEC {}
#[doc = "`reset()` method sets GSTAT to value 0x0f"]
impl crate::Resettable for GSTAT_SPEC {
    const RESET_VALUE: u32 = 0x0f;
}