efm32gg11b840_pac/sdio/
maxcurcapab.rs

1#[doc = "Register `MAXCURCAPAB` reader"]
2pub struct R(crate::R<MAXCURCAPAB_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<MAXCURCAPAB_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<MAXCURCAPAB_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<MAXCURCAPAB_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `MAXCUR3P3VAL` reader - Maximum Current for 3.3V"]
17pub type MAXCUR3P3VAL_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `MAXCUR3P0VAL` reader - Maximum Current for 3.0V"]
19pub type MAXCUR3P0VAL_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `MAXCUR1P8VAL` reader - Maximum Current for 1.8V"]
21pub type MAXCUR1P8VAL_R = crate::FieldReader<u8, u8>;
22impl R {
23    #[doc = "Bits 0:7 - Maximum Current for 3.3V"]
24    #[inline(always)]
25    pub fn maxcur3p3val(&self) -> MAXCUR3P3VAL_R {
26        MAXCUR3P3VAL_R::new((self.bits & 0xff) as u8)
27    }
28    #[doc = "Bits 8:15 - Maximum Current for 3.0V"]
29    #[inline(always)]
30    pub fn maxcur3p0val(&self) -> MAXCUR3P0VAL_R {
31        MAXCUR3P0VAL_R::new(((self.bits >> 8) & 0xff) as u8)
32    }
33    #[doc = "Bits 16:23 - Maximum Current for 1.8V"]
34    #[inline(always)]
35    pub fn maxcur1p8val(&self) -> MAXCUR1P8VAL_R {
36        MAXCUR1P8VAL_R::new(((self.bits >> 16) & 0xff) as u8)
37    }
38}
39#[doc = "Maximum Current Capabilities 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 [maxcurcapab](index.html) module"]
40pub struct MAXCURCAPAB_SPEC;
41impl crate::RegisterSpec for MAXCURCAPAB_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [maxcurcapab::R](R) reader structure"]
45impl crate::Readable for MAXCURCAPAB_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets MAXCURCAPAB to value 0"]
49impl crate::Resettable for MAXCURCAPAB_SPEC {
50    #[inline(always)]
51    fn reset_value() -> Self::Ux {
52        0
53    }
54}