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
#[doc = "Register `GHWCFG3` reader"]
pub struct R(crate::R<GHWCFG3_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<GHWCFG3_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<GHWCFG3_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<GHWCFG3_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `XFERSIZEWIDTH` reader - "]
pub type XFERSIZEWIDTH_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PKTSIZEWIDTH` reader - "]
pub type PKTSIZEWIDTH_R = crate::FieldReader<u8, u8>;
#[doc = "Field `OTGEN` reader - "]
pub type OTGEN_R = crate::BitReader<bool>;
#[doc = "Field `I2CINTSEL` reader - "]
pub type I2CINTSEL_R = crate::BitReader<bool>;
#[doc = "Field `VNDCTLSUPT` reader - "]
pub type VNDCTLSUPT_R = crate::BitReader<bool>;
#[doc = "Field `OPTFEATURE` reader - "]
pub type OPTFEATURE_R = crate::BitReader<bool>;
#[doc = "Field `RSTTYPE` reader - "]
pub type RSTTYPE_R = crate::BitReader<bool>;
#[doc = "Field `ADPSUPPORT` reader - "]
pub type ADPSUPPORT_R = crate::BitReader<bool>;
#[doc = "Field `HSICMODE` reader - "]
pub type HSICMODE_R = crate::BitReader<bool>;
#[doc = "Field `BCSUPPORT` reader - "]
pub type BCSUPPORT_R = crate::BitReader<bool>;
#[doc = "Field `LPMMODE` reader - "]
pub type LPMMODE_R = crate::BitReader<bool>;
#[doc = "Field `DFIFODEPTH` reader - "]
pub type DFIFODEPTH_R = crate::FieldReader<u16, u16>;
impl R {
    #[doc = "Bits 0:3"]
    #[inline(always)]
    pub fn xfersizewidth(&self) -> XFERSIZEWIDTH_R {
        XFERSIZEWIDTH_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bits 4:6"]
    #[inline(always)]
    pub fn pktsizewidth(&self) -> PKTSIZEWIDTH_R {
        PKTSIZEWIDTH_R::new(((self.bits >> 4) & 7) as u8)
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    pub fn otgen(&self) -> OTGEN_R {
        OTGEN_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8"]
    #[inline(always)]
    pub fn i2cintsel(&self) -> I2CINTSEL_R {
        I2CINTSEL_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9"]
    #[inline(always)]
    pub fn vndctlsupt(&self) -> VNDCTLSUPT_R {
        VNDCTLSUPT_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10"]
    #[inline(always)]
    pub fn optfeature(&self) -> OPTFEATURE_R {
        OPTFEATURE_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11"]
    #[inline(always)]
    pub fn rsttype(&self) -> RSTTYPE_R {
        RSTTYPE_R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    pub fn adpsupport(&self) -> ADPSUPPORT_R {
        ADPSUPPORT_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13"]
    #[inline(always)]
    pub fn hsicmode(&self) -> HSICMODE_R {
        HSICMODE_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 14"]
    #[inline(always)]
    pub fn bcsupport(&self) -> BCSUPPORT_R {
        BCSUPPORT_R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15"]
    #[inline(always)]
    pub fn lpmmode(&self) -> LPMMODE_R {
        LPMMODE_R::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bits 16:31"]
    #[inline(always)]
    pub fn dfifodepth(&self) -> DFIFODEPTH_R {
        DFIFODEPTH_R::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
#[doc = "\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 [ghwcfg3](index.html) module"]
pub struct GHWCFG3_SPEC;
impl crate::RegisterSpec for GHWCFG3_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [ghwcfg3::R](R) reader structure"]
impl crate::Readable for GHWCFG3_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets GHWCFG3 to value 0x0100_04b5"]
impl crate::Resettable for GHWCFG3_SPEC {
    const RESET_VALUE: Self::Ux = 0x0100_04b5;
}