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
#[doc = "Register `UCBxIV` reader"]
pub struct R(crate::R<UCBXIV_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<UCBXIV_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<UCBXIV_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<UCBXIV_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "eUSCI_B interrupt vector value\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u16)]
pub enum UCIV_A {
    #[doc = "0: No interrupt pending"]
    UCIV_0 = 0,
    #[doc = "2: Interrupt Source: Arbitration lost; Interrupt Flag: UCALIFG; Interrupt Priority: Highest"]
    UCIV_2 = 2,
    #[doc = "4: Interrupt Source: Not acknowledgment; Interrupt Flag: UCNACKIFG"]
    UCIV_4 = 4,
    #[doc = "6: Interrupt Source: Start condition received; Interrupt Flag: UCSTTIFG"]
    UCIV_6 = 6,
    #[doc = "8: Interrupt Source: Stop condition received; Interrupt Flag: UCSTPIFG"]
    UCIV_8 = 8,
    #[doc = "10: Interrupt Source: Slave 3 Data received; Interrupt Flag: UCRXIFG3"]
    UCIV_10 = 10,
    #[doc = "12: Interrupt Source: Slave 3 Transmit buffer empty; Interrupt Flag: UCTXIFG3"]
    UCIV_12 = 12,
    #[doc = "14: Interrupt Source: Slave 2 Data received; Interrupt Flag: UCRXIFG2"]
    UCIV_14 = 14,
    #[doc = "16: Interrupt Source: Slave 2 Transmit buffer empty; Interrupt Flag: UCTXIFG2"]
    UCIV_16 = 16,
    #[doc = "18: Interrupt Source: Slave 1 Data received; Interrupt Flag: UCRXIFG1"]
    UCIV_18 = 18,
    #[doc = "20: Interrupt Source: Slave 1 Transmit buffer empty; Interrupt Flag: UCTXIFG1"]
    UCIV_20 = 20,
    #[doc = "22: Interrupt Source: Data received; Interrupt Flag: UCRXIFG0"]
    UCIV_22 = 22,
    #[doc = "24: Interrupt Source: Transmit buffer empty; Interrupt Flag: UCTXIFG0"]
    UCIV_24 = 24,
    #[doc = "26: Interrupt Source: Byte counter zero; Interrupt Flag: UCBCNTIFG"]
    UCIV_26 = 26,
    #[doc = "28: Interrupt Source: Clock low timeout; Interrupt Flag: UCCLTOIFG"]
    UCIV_28 = 28,
    #[doc = "30: Interrupt Source: Nineth bit position; Interrupt Flag: UCBIT9IFG; Priority: Lowest"]
    UCIV_30 = 30,
}
impl From<UCIV_A> for u16 {
    #[inline(always)]
    fn from(variant: UCIV_A) -> Self {
        variant as _
    }
}
#[doc = "Field `UCIV` reader - eUSCI_B interrupt vector value"]
pub type UCIV_R = crate::FieldReader<u16, UCIV_A>;
impl UCIV_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> Option<UCIV_A> {
        match self.bits {
            0 => Some(UCIV_A::UCIV_0),
            2 => Some(UCIV_A::UCIV_2),
            4 => Some(UCIV_A::UCIV_4),
            6 => Some(UCIV_A::UCIV_6),
            8 => Some(UCIV_A::UCIV_8),
            10 => Some(UCIV_A::UCIV_10),
            12 => Some(UCIV_A::UCIV_12),
            14 => Some(UCIV_A::UCIV_14),
            16 => Some(UCIV_A::UCIV_16),
            18 => Some(UCIV_A::UCIV_18),
            20 => Some(UCIV_A::UCIV_20),
            22 => Some(UCIV_A::UCIV_22),
            24 => Some(UCIV_A::UCIV_24),
            26 => Some(UCIV_A::UCIV_26),
            28 => Some(UCIV_A::UCIV_28),
            30 => Some(UCIV_A::UCIV_30),
            _ => None,
        }
    }
    #[doc = "Checks if the value of the field is `UCIV_0`"]
    #[inline(always)]
    pub fn is_uciv_0(&self) -> bool {
        *self == UCIV_A::UCIV_0
    }
    #[doc = "Checks if the value of the field is `UCIV_2`"]
    #[inline(always)]
    pub fn is_uciv_2(&self) -> bool {
        *self == UCIV_A::UCIV_2
    }
    #[doc = "Checks if the value of the field is `UCIV_4`"]
    #[inline(always)]
    pub fn is_uciv_4(&self) -> bool {
        *self == UCIV_A::UCIV_4
    }
    #[doc = "Checks if the value of the field is `UCIV_6`"]
    #[inline(always)]
    pub fn is_uciv_6(&self) -> bool {
        *self == UCIV_A::UCIV_6
    }
    #[doc = "Checks if the value of the field is `UCIV_8`"]
    #[inline(always)]
    pub fn is_uciv_8(&self) -> bool {
        *self == UCIV_A::UCIV_8
    }
    #[doc = "Checks if the value of the field is `UCIV_10`"]
    #[inline(always)]
    pub fn is_uciv_10(&self) -> bool {
        *self == UCIV_A::UCIV_10
    }
    #[doc = "Checks if the value of the field is `UCIV_12`"]
    #[inline(always)]
    pub fn is_uciv_12(&self) -> bool {
        *self == UCIV_A::UCIV_12
    }
    #[doc = "Checks if the value of the field is `UCIV_14`"]
    #[inline(always)]
    pub fn is_uciv_14(&self) -> bool {
        *self == UCIV_A::UCIV_14
    }
    #[doc = "Checks if the value of the field is `UCIV_16`"]
    #[inline(always)]
    pub fn is_uciv_16(&self) -> bool {
        *self == UCIV_A::UCIV_16
    }
    #[doc = "Checks if the value of the field is `UCIV_18`"]
    #[inline(always)]
    pub fn is_uciv_18(&self) -> bool {
        *self == UCIV_A::UCIV_18
    }
    #[doc = "Checks if the value of the field is `UCIV_20`"]
    #[inline(always)]
    pub fn is_uciv_20(&self) -> bool {
        *self == UCIV_A::UCIV_20
    }
    #[doc = "Checks if the value of the field is `UCIV_22`"]
    #[inline(always)]
    pub fn is_uciv_22(&self) -> bool {
        *self == UCIV_A::UCIV_22
    }
    #[doc = "Checks if the value of the field is `UCIV_24`"]
    #[inline(always)]
    pub fn is_uciv_24(&self) -> bool {
        *self == UCIV_A::UCIV_24
    }
    #[doc = "Checks if the value of the field is `UCIV_26`"]
    #[inline(always)]
    pub fn is_uciv_26(&self) -> bool {
        *self == UCIV_A::UCIV_26
    }
    #[doc = "Checks if the value of the field is `UCIV_28`"]
    #[inline(always)]
    pub fn is_uciv_28(&self) -> bool {
        *self == UCIV_A::UCIV_28
    }
    #[doc = "Checks if the value of the field is `UCIV_30`"]
    #[inline(always)]
    pub fn is_uciv_30(&self) -> bool {
        *self == UCIV_A::UCIV_30
    }
}
impl R {
    #[doc = "Bits 0:15 - eUSCI_B interrupt vector value"]
    #[inline(always)]
    pub fn uciv(&self) -> UCIV_R {
        UCIV_R::new(self.bits)
    }
}
#[doc = "eUSCI_Bx Interrupt Vector Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ucbx_iv](index.html) module"]
pub struct UCBXIV_SPEC;
impl crate::RegisterSpec for UCBXIV_SPEC {
    type Ux = u16;
}
#[doc = "`read()` method returns [ucbx_iv::R](R) reader structure"]
impl crate::Readable for UCBXIV_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets UCBxIV to value 0"]
impl crate::Resettable for UCBXIV_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}