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
#[doc = r" Value read from the register"]
pub struct R {
    bits: u32,
}
impl super::MCCAR {
    #[doc = r" Reads the contents of the register"]
    #[inline]
    pub fn read(&self) -> R {
        R {
            bits: self.register.get(),
        }
    }
}
#[doc = "Possible values of the field `MAXCUR33V`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MAXCUR33VR {
    #[doc = "Get information via another method"]
    OTHER,
    #[doc = "4mA"]
    _4MA,
    #[doc = "8mA"]
    _8MA,
    #[doc = "12mA"]
    _12MA,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl MAXCUR33VR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            MAXCUR33VR::OTHER => 0,
            MAXCUR33VR::_4MA => 1,
            MAXCUR33VR::_8MA => 2,
            MAXCUR33VR::_12MA => 3,
            MAXCUR33VR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> MAXCUR33VR {
        match value {
            0 => MAXCUR33VR::OTHER,
            1 => MAXCUR33VR::_4MA,
            2 => MAXCUR33VR::_8MA,
            3 => MAXCUR33VR::_12MA,
            i => MAXCUR33VR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `OTHER`"]
    #[inline]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR33VR::OTHER
    }
    #[doc = "Checks if the value of the field is `_4MA`"]
    #[inline]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR33VR::_4MA
    }
    #[doc = "Checks if the value of the field is `_8MA`"]
    #[inline]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR33VR::_8MA
    }
    #[doc = "Checks if the value of the field is `_12MA`"]
    #[inline]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR33VR::_12MA
    }
}
#[doc = "Possible values of the field `MAXCUR30V`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MAXCUR30VR {
    #[doc = "Get information via another method"]
    OTHER,
    #[doc = "4mA"]
    _4MA,
    #[doc = "8mA"]
    _8MA,
    #[doc = "12mA"]
    _12MA,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl MAXCUR30VR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            MAXCUR30VR::OTHER => 0,
            MAXCUR30VR::_4MA => 1,
            MAXCUR30VR::_8MA => 2,
            MAXCUR30VR::_12MA => 3,
            MAXCUR30VR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> MAXCUR30VR {
        match value {
            0 => MAXCUR30VR::OTHER,
            1 => MAXCUR30VR::_4MA,
            2 => MAXCUR30VR::_8MA,
            3 => MAXCUR30VR::_12MA,
            i => MAXCUR30VR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `OTHER`"]
    #[inline]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR30VR::OTHER
    }
    #[doc = "Checks if the value of the field is `_4MA`"]
    #[inline]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR30VR::_4MA
    }
    #[doc = "Checks if the value of the field is `_8MA`"]
    #[inline]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR30VR::_8MA
    }
    #[doc = "Checks if the value of the field is `_12MA`"]
    #[inline]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR30VR::_12MA
    }
}
#[doc = "Possible values of the field `MAXCUR18V`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MAXCUR18VR {
    #[doc = "Get information via another method"]
    OTHER,
    #[doc = "4mA"]
    _4MA,
    #[doc = "8mA"]
    _8MA,
    #[doc = "12mA"]
    _12MA,
    #[doc = r" Reserved"]
    _Reserved(u8),
}
impl MAXCUR18VR {
    #[doc = r" Value of the field as raw bits"]
    #[inline]
    pub fn bits(&self) -> u8 {
        match *self {
            MAXCUR18VR::OTHER => 0,
            MAXCUR18VR::_4MA => 1,
            MAXCUR18VR::_8MA => 2,
            MAXCUR18VR::_12MA => 3,
            MAXCUR18VR::_Reserved(bits) => bits,
        }
    }
    #[allow(missing_docs)]
    #[doc(hidden)]
    #[inline]
    pub fn _from(value: u8) -> MAXCUR18VR {
        match value {
            0 => MAXCUR18VR::OTHER,
            1 => MAXCUR18VR::_4MA,
            2 => MAXCUR18VR::_8MA,
            3 => MAXCUR18VR::_12MA,
            i => MAXCUR18VR::_Reserved(i),
        }
    }
    #[doc = "Checks if the value of the field is `OTHER`"]
    #[inline]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR18VR::OTHER
    }
    #[doc = "Checks if the value of the field is `_4MA`"]
    #[inline]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR18VR::_4MA
    }
    #[doc = "Checks if the value of the field is `_8MA`"]
    #[inline]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR18VR::_8MA
    }
    #[doc = "Checks if the value of the field is `_12MA`"]
    #[inline]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR18VR::_12MA
    }
}
impl R {
    #[doc = r" Value of the register as raw bits"]
    #[inline]
    pub fn bits(&self) -> u32 {
        self.bits
    }
    #[doc = "Bits 0:7 - Maximum Current for 3.3V"]
    #[inline]
    pub fn maxcur33v(&self) -> MAXCUR33VR {
        MAXCUR33VR::_from({
            const MASK: u8 = 255;
            const OFFSET: u8 = 0;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bits 8:15 - Maximum Current for 3.0V"]
    #[inline]
    pub fn maxcur30v(&self) -> MAXCUR30VR {
        MAXCUR30VR::_from({
            const MASK: u8 = 255;
            const OFFSET: u8 = 8;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
    #[doc = "Bits 16:23 - Maximum Current for 1.8V"]
    #[inline]
    pub fn maxcur18v(&self) -> MAXCUR18VR {
        MAXCUR18VR::_from({
            const MASK: u8 = 255;
            const OFFSET: u8 = 16;
            ((self.bits >> OFFSET) & MASK as u32) as u8
        })
    }
}