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
#[doc = "Register `UCAxIE` reader"]
pub struct R(crate::R<UCAXIE_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<UCAXIE_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<UCAXIE_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<UCAXIE_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `UCAxIE` writer"]
pub struct W(crate::W<UCAXIE_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<UCAXIE_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<UCAXIE_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<UCAXIE_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Receive interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UCRXIE_A {
    #[doc = "0: Interrupt disabled"]
    UCRXIE_0 = 0,
    #[doc = "1: Interrupt enabled"]
    UCRXIE_1 = 1,
}
impl From<UCRXIE_A> for bool {
    #[inline(always)]
    fn from(variant: UCRXIE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `UCRXIE` reader - Receive interrupt enable"]
pub type UCRXIE_R = crate::BitReader<UCRXIE_A>;
impl UCRXIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> UCRXIE_A {
        match self.bits {
            false => UCRXIE_A::UCRXIE_0,
            true => UCRXIE_A::UCRXIE_1,
        }
    }
    #[doc = "Checks if the value of the field is `UCRXIE_0`"]
    #[inline(always)]
    pub fn is_ucrxie_0(&self) -> bool {
        *self == UCRXIE_A::UCRXIE_0
    }
    #[doc = "Checks if the value of the field is `UCRXIE_1`"]
    #[inline(always)]
    pub fn is_ucrxie_1(&self) -> bool {
        *self == UCRXIE_A::UCRXIE_1
    }
}
#[doc = "Field `UCRXIE` writer - Receive interrupt enable"]
pub type UCRXIE_W<'a, const O: u8> = crate::BitWriter<'a, u16, UCAXIE_SPEC, UCRXIE_A, O>;
impl<'a, const O: u8> UCRXIE_W<'a, O> {
    #[doc = "Interrupt disabled"]
    #[inline(always)]
    pub fn ucrxie_0(self) -> &'a mut W {
        self.variant(UCRXIE_A::UCRXIE_0)
    }
    #[doc = "Interrupt enabled"]
    #[inline(always)]
    pub fn ucrxie_1(self) -> &'a mut W {
        self.variant(UCRXIE_A::UCRXIE_1)
    }
}
#[doc = "Transmit interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UCTXIE_A {
    #[doc = "0: Interrupt disabled"]
    UCTXIE_0 = 0,
    #[doc = "1: Interrupt enabled"]
    UCTXIE_1 = 1,
}
impl From<UCTXIE_A> for bool {
    #[inline(always)]
    fn from(variant: UCTXIE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `UCTXIE` reader - Transmit interrupt enable"]
pub type UCTXIE_R = crate::BitReader<UCTXIE_A>;
impl UCTXIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> UCTXIE_A {
        match self.bits {
            false => UCTXIE_A::UCTXIE_0,
            true => UCTXIE_A::UCTXIE_1,
        }
    }
    #[doc = "Checks if the value of the field is `UCTXIE_0`"]
    #[inline(always)]
    pub fn is_uctxie_0(&self) -> bool {
        *self == UCTXIE_A::UCTXIE_0
    }
    #[doc = "Checks if the value of the field is `UCTXIE_1`"]
    #[inline(always)]
    pub fn is_uctxie_1(&self) -> bool {
        *self == UCTXIE_A::UCTXIE_1
    }
}
#[doc = "Field `UCTXIE` writer - Transmit interrupt enable"]
pub type UCTXIE_W<'a, const O: u8> = crate::BitWriter<'a, u16, UCAXIE_SPEC, UCTXIE_A, O>;
impl<'a, const O: u8> UCTXIE_W<'a, O> {
    #[doc = "Interrupt disabled"]
    #[inline(always)]
    pub fn uctxie_0(self) -> &'a mut W {
        self.variant(UCTXIE_A::UCTXIE_0)
    }
    #[doc = "Interrupt enabled"]
    #[inline(always)]
    pub fn uctxie_1(self) -> &'a mut W {
        self.variant(UCTXIE_A::UCTXIE_1)
    }
}
#[doc = "Start bit interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UCSTTIE_A {
    #[doc = "0: Interrupt disabled"]
    UCSTTIE_0 = 0,
    #[doc = "1: Interrupt enabled"]
    UCSTTIE_1 = 1,
}
impl From<UCSTTIE_A> for bool {
    #[inline(always)]
    fn from(variant: UCSTTIE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `UCSTTIE` reader - Start bit interrupt enable"]
pub type UCSTTIE_R = crate::BitReader<UCSTTIE_A>;
impl UCSTTIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> UCSTTIE_A {
        match self.bits {
            false => UCSTTIE_A::UCSTTIE_0,
            true => UCSTTIE_A::UCSTTIE_1,
        }
    }
    #[doc = "Checks if the value of the field is `UCSTTIE_0`"]
    #[inline(always)]
    pub fn is_ucsttie_0(&self) -> bool {
        *self == UCSTTIE_A::UCSTTIE_0
    }
    #[doc = "Checks if the value of the field is `UCSTTIE_1`"]
    #[inline(always)]
    pub fn is_ucsttie_1(&self) -> bool {
        *self == UCSTTIE_A::UCSTTIE_1
    }
}
#[doc = "Field `UCSTTIE` writer - Start bit interrupt enable"]
pub type UCSTTIE_W<'a, const O: u8> = crate::BitWriter<'a, u16, UCAXIE_SPEC, UCSTTIE_A, O>;
impl<'a, const O: u8> UCSTTIE_W<'a, O> {
    #[doc = "Interrupt disabled"]
    #[inline(always)]
    pub fn ucsttie_0(self) -> &'a mut W {
        self.variant(UCSTTIE_A::UCSTTIE_0)
    }
    #[doc = "Interrupt enabled"]
    #[inline(always)]
    pub fn ucsttie_1(self) -> &'a mut W {
        self.variant(UCSTTIE_A::UCSTTIE_1)
    }
}
#[doc = "Transmit complete interrupt enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UCTXCPTIE_A {
    #[doc = "0: Interrupt disabled"]
    UCTXCPTIE_0 = 0,
    #[doc = "1: Interrupt enabled"]
    UCTXCPTIE_1 = 1,
}
impl From<UCTXCPTIE_A> for bool {
    #[inline(always)]
    fn from(variant: UCTXCPTIE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `UCTXCPTIE` reader - Transmit complete interrupt enable"]
pub type UCTXCPTIE_R = crate::BitReader<UCTXCPTIE_A>;
impl UCTXCPTIE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> UCTXCPTIE_A {
        match self.bits {
            false => UCTXCPTIE_A::UCTXCPTIE_0,
            true => UCTXCPTIE_A::UCTXCPTIE_1,
        }
    }
    #[doc = "Checks if the value of the field is `UCTXCPTIE_0`"]
    #[inline(always)]
    pub fn is_uctxcptie_0(&self) -> bool {
        *self == UCTXCPTIE_A::UCTXCPTIE_0
    }
    #[doc = "Checks if the value of the field is `UCTXCPTIE_1`"]
    #[inline(always)]
    pub fn is_uctxcptie_1(&self) -> bool {
        *self == UCTXCPTIE_A::UCTXCPTIE_1
    }
}
#[doc = "Field `UCTXCPTIE` writer - Transmit complete interrupt enable"]
pub type UCTXCPTIE_W<'a, const O: u8> = crate::BitWriter<'a, u16, UCAXIE_SPEC, UCTXCPTIE_A, O>;
impl<'a, const O: u8> UCTXCPTIE_W<'a, O> {
    #[doc = "Interrupt disabled"]
    #[inline(always)]
    pub fn uctxcptie_0(self) -> &'a mut W {
        self.variant(UCTXCPTIE_A::UCTXCPTIE_0)
    }
    #[doc = "Interrupt enabled"]
    #[inline(always)]
    pub fn uctxcptie_1(self) -> &'a mut W {
        self.variant(UCTXCPTIE_A::UCTXCPTIE_1)
    }
}
impl R {
    #[doc = "Bit 0 - Receive interrupt enable"]
    #[inline(always)]
    pub fn ucrxie(&self) -> UCRXIE_R {
        UCRXIE_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Transmit interrupt enable"]
    #[inline(always)]
    pub fn uctxie(&self) -> UCTXIE_R {
        UCTXIE_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Start bit interrupt enable"]
    #[inline(always)]
    pub fn ucsttie(&self) -> UCSTTIE_R {
        UCSTTIE_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Transmit complete interrupt enable"]
    #[inline(always)]
    pub fn uctxcptie(&self) -> UCTXCPTIE_R {
        UCTXCPTIE_R::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Receive interrupt enable"]
    #[inline(always)]
    pub fn ucrxie(&mut self) -> UCRXIE_W<0> {
        UCRXIE_W::new(self)
    }
    #[doc = "Bit 1 - Transmit interrupt enable"]
    #[inline(always)]
    pub fn uctxie(&mut self) -> UCTXIE_W<1> {
        UCTXIE_W::new(self)
    }
    #[doc = "Bit 2 - Start bit interrupt enable"]
    #[inline(always)]
    pub fn ucsttie(&mut self) -> UCSTTIE_W<2> {
        UCSTTIE_W::new(self)
    }
    #[doc = "Bit 3 - Transmit complete interrupt enable"]
    #[inline(always)]
    pub fn uctxcptie(&mut self) -> UCTXCPTIE_W<3> {
        UCTXCPTIE_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "eUSCI_Ax Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ucax_ie](index.html) module"]
pub struct UCAXIE_SPEC;
impl crate::RegisterSpec for UCAXIE_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [ucax_ie::R](R) reader structure"]
impl crate::Readable for UCAXIE_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ucax_ie::W](W) writer structure"]
impl crate::Writable for UCAXIE_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets UCAxIE to value 0"]
impl crate::Resettable for UCAXIE_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}