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
#[doc = "Register `GSTAT` reader"]
pub type R = crate::R<GstatSpec>;
#[doc = "CC40 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S0i {
    #[doc = "0: Running"]
    Value1 = 0,
    #[doc = "1: Idle"]
    Value2 = 1,
}
impl From<S0i> for bool {
    #[inline(always)]
    fn from(variant: S0i) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S0I` reader - CC40 IDLE status"]
pub type S0iR = crate::BitReader<S0i>;
impl S0iR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S0i {
        match self.bits {
            false => S0i::Value1,
            true => S0i::Value2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S0i::Value1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S0i::Value2
    }
}
#[doc = "CC41 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S1i {
    #[doc = "0: Running"]
    Value1 = 0,
    #[doc = "1: Idle"]
    Value2 = 1,
}
impl From<S1i> for bool {
    #[inline(always)]
    fn from(variant: S1i) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S1I` reader - CC41 IDLE status"]
pub type S1iR = crate::BitReader<S1i>;
impl S1iR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S1i {
        match self.bits {
            false => S1i::Value1,
            true => S1i::Value2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S1i::Value1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S1i::Value2
    }
}
#[doc = "CC42 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S2i {
    #[doc = "0: Running"]
    Value1 = 0,
    #[doc = "1: Idle"]
    Value2 = 1,
}
impl From<S2i> for bool {
    #[inline(always)]
    fn from(variant: S2i) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S2I` reader - CC42 IDLE status"]
pub type S2iR = crate::BitReader<S2i>;
impl S2iR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S2i {
        match self.bits {
            false => S2i::Value1,
            true => S2i::Value2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S2i::Value1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S2i::Value2
    }
}
#[doc = "CC43 IDLE status\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S3i {
    #[doc = "0: Running"]
    Value1 = 0,
    #[doc = "1: Idle"]
    Value2 = 1,
}
impl From<S3i> for bool {
    #[inline(always)]
    fn from(variant: S3i) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S3I` reader - CC43 IDLE status"]
pub type S3iR = crate::BitReader<S3i>;
impl S3iR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S3i {
        match self.bits {
            false => S3i::Value1,
            true => S3i::Value2,
        }
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S3i::Value1
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S3i::Value2
    }
}
#[doc = "Prescaler Run Bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Prb {
    #[doc = "0: Prescaler is stopped"]
    Value1 = 0,
    #[doc = "1: Prescaler is running"]
    Value2 = 1,
}
impl From<Prb> for bool {
    #[inline(always)]
    fn from(variant: Prb) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PRB` reader - Prescaler Run Bit"]
pub type PrbR = crate::BitReader<Prb>;
impl PrbR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Prb {
        match self.bits {
            false => Prb::Value1,
            true => Prb::Value2,
        }
    }
    #[doc = "Prescaler is stopped"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Prb::Value1
    }
    #[doc = "Prescaler is running"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Prb::Value2
    }
}
impl R {
    #[doc = "Bit 0 - CC40 IDLE status"]
    #[inline(always)]
    pub fn s0i(&self) -> S0iR {
        S0iR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - CC41 IDLE status"]
    #[inline(always)]
    pub fn s1i(&self) -> S1iR {
        S1iR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - CC42 IDLE status"]
    #[inline(always)]
    pub fn s2i(&self) -> S2iR {
        S2iR::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - CC43 IDLE status"]
    #[inline(always)]
    pub fn s3i(&self) -> S3iR {
        S3iR::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 8 - Prescaler Run Bit"]
    #[inline(always)]
    pub fn prb(&self) -> PrbR {
        PrbR::new(((self.bits >> 8) & 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 GstatSpec;
impl crate::RegisterSpec for GstatSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`gstat::R`](R) reader structure"]
impl crate::Readable for GstatSpec {}
#[doc = "`reset()` method sets GSTAT to value 0x0f"]
impl crate::Resettable for GstatSpec {
    const RESET_VALUE: u32 = 0x0f;
}