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
#[doc = "Register `MCCAR` reader"]
pub type R = crate::R<MCCAR_SPEC>;
#[doc = "Field `MAXCUR33V` reader - Maximum Current for 3.3V"]
pub type MAXCUR33V_R = crate::FieldReader<MAXCUR33VSELECT_A>;
#[doc = "Maximum Current for 3.3V\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MAXCUR33VSELECT_A {
    #[doc = "0: Get information via another method"]
    OTHER = 0,
    #[doc = "1: 4mA"]
    _4MA = 1,
    #[doc = "2: 8mA"]
    _8MA = 2,
    #[doc = "3: 12mA"]
    _12MA = 3,
}
impl From<MAXCUR33VSELECT_A> for u8 {
    #[inline(always)]
    fn from(variant: MAXCUR33VSELECT_A) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for MAXCUR33VSELECT_A {
    type Ux = u8;
}
impl MAXCUR33V_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<MAXCUR33VSELECT_A> {
        match self.bits {
            0 => Some(MAXCUR33VSELECT_A::OTHER),
            1 => Some(MAXCUR33VSELECT_A::_4MA),
            2 => Some(MAXCUR33VSELECT_A::_8MA),
            3 => Some(MAXCUR33VSELECT_A::_12MA),
            _ => None,
        }
    }
    #[doc = "Get information via another method"]
    #[inline(always)]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR33VSELECT_A::OTHER
    }
    #[doc = "4mA"]
    #[inline(always)]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR33VSELECT_A::_4MA
    }
    #[doc = "8mA"]
    #[inline(always)]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR33VSELECT_A::_8MA
    }
    #[doc = "12mA"]
    #[inline(always)]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR33VSELECT_A::_12MA
    }
}
#[doc = "Field `MAXCUR30V` reader - Maximum Current for 3.0V"]
pub type MAXCUR30V_R = crate::FieldReader<MAXCUR30VSELECT_A>;
#[doc = "Maximum Current for 3.0V\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MAXCUR30VSELECT_A {
    #[doc = "0: Get information via another method"]
    OTHER = 0,
    #[doc = "1: 4mA"]
    _4MA = 1,
    #[doc = "2: 8mA"]
    _8MA = 2,
    #[doc = "3: 12mA"]
    _12MA = 3,
}
impl From<MAXCUR30VSELECT_A> for u8 {
    #[inline(always)]
    fn from(variant: MAXCUR30VSELECT_A) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for MAXCUR30VSELECT_A {
    type Ux = u8;
}
impl MAXCUR30V_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<MAXCUR30VSELECT_A> {
        match self.bits {
            0 => Some(MAXCUR30VSELECT_A::OTHER),
            1 => Some(MAXCUR30VSELECT_A::_4MA),
            2 => Some(MAXCUR30VSELECT_A::_8MA),
            3 => Some(MAXCUR30VSELECT_A::_12MA),
            _ => None,
        }
    }
    #[doc = "Get information via another method"]
    #[inline(always)]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR30VSELECT_A::OTHER
    }
    #[doc = "4mA"]
    #[inline(always)]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR30VSELECT_A::_4MA
    }
    #[doc = "8mA"]
    #[inline(always)]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR30VSELECT_A::_8MA
    }
    #[doc = "12mA"]
    #[inline(always)]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR30VSELECT_A::_12MA
    }
}
#[doc = "Field `MAXCUR18V` reader - Maximum Current for 1.8V"]
pub type MAXCUR18V_R = crate::FieldReader<MAXCUR18VSELECT_A>;
#[doc = "Maximum Current for 1.8V\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum MAXCUR18VSELECT_A {
    #[doc = "0: Get information via another method"]
    OTHER = 0,
    #[doc = "1: 4mA"]
    _4MA = 1,
    #[doc = "2: 8mA"]
    _8MA = 2,
    #[doc = "3: 12mA"]
    _12MA = 3,
}
impl From<MAXCUR18VSELECT_A> for u8 {
    #[inline(always)]
    fn from(variant: MAXCUR18VSELECT_A) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for MAXCUR18VSELECT_A {
    type Ux = u8;
}
impl MAXCUR18V_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<MAXCUR18VSELECT_A> {
        match self.bits {
            0 => Some(MAXCUR18VSELECT_A::OTHER),
            1 => Some(MAXCUR18VSELECT_A::_4MA),
            2 => Some(MAXCUR18VSELECT_A::_8MA),
            3 => Some(MAXCUR18VSELECT_A::_12MA),
            _ => None,
        }
    }
    #[doc = "Get information via another method"]
    #[inline(always)]
    pub fn is_other(&self) -> bool {
        *self == MAXCUR18VSELECT_A::OTHER
    }
    #[doc = "4mA"]
    #[inline(always)]
    pub fn is_4ma(&self) -> bool {
        *self == MAXCUR18VSELECT_A::_4MA
    }
    #[doc = "8mA"]
    #[inline(always)]
    pub fn is_8ma(&self) -> bool {
        *self == MAXCUR18VSELECT_A::_8MA
    }
    #[doc = "12mA"]
    #[inline(always)]
    pub fn is_12ma(&self) -> bool {
        *self == MAXCUR18VSELECT_A::_12MA
    }
}
impl R {
    #[doc = "Bits 0:7 - Maximum Current for 3.3V"]
    #[inline(always)]
    pub fn maxcur33v(&self) -> MAXCUR33V_R {
        MAXCUR33V_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bits 8:15 - Maximum Current for 3.0V"]
    #[inline(always)]
    pub fn maxcur30v(&self) -> MAXCUR30V_R {
        MAXCUR30V_R::new(((self.bits >> 8) & 0xff) as u8)
    }
    #[doc = "Bits 16:23 - Maximum Current for 1.8V"]
    #[inline(always)]
    pub fn maxcur18v(&self) -> MAXCUR18V_R {
        MAXCUR18V_R::new(((self.bits >> 16) & 0xff) as u8)
    }
}
#[doc = "Maximum Current Capabilities\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mccar::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct MCCAR_SPEC;
impl crate::RegisterSpec for MCCAR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`mccar::R`](R) reader structure"]
impl crate::Readable for MCCAR_SPEC {}
#[doc = "`reset()` method sets MCCAR to value 0"]
impl crate::Resettable for MCCAR_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}