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
#[doc = "Register `GHWCFG4` reader"]
pub type R = crate::R<GHWCFG4_SPEC>;
#[doc = "Field `G_NUMDEVPERIOEPS` reader - "]
pub type G_NUMDEVPERIOEPS_R = crate::FieldReader;
#[doc = "Field `G_PARTIALPWRDN` reader - "]
pub type G_PARTIALPWRDN_R = crate::BitReader;
#[doc = "Field `G_AHBFREQ` reader - "]
pub type G_AHBFREQ_R = crate::BitReader;
#[doc = "Field `G_HIBERNATION` reader - "]
pub type G_HIBERNATION_R = crate::BitReader;
#[doc = "Field `G_EXTENDEDHIBERNATION` reader - "]
pub type G_EXTENDEDHIBERNATION_R = crate::BitReader;
#[doc = "Field `G_ACGSUPT` reader - "]
pub type G_ACGSUPT_R = crate::BitReader;
#[doc = "Field `G_ENHANCEDLPMSUPT` reader - "]
pub type G_ENHANCEDLPMSUPT_R = crate::BitReader;
#[doc = "Field `G_PHYDATAWIDTH` reader - "]
pub type G_PHYDATAWIDTH_R = crate::FieldReader;
#[doc = "Field `G_NUMCTLEPS` reader - "]
pub type G_NUMCTLEPS_R = crate::FieldReader;
#[doc = "Field `G_IDDQFLTR` reader - "]
pub type G_IDDQFLTR_R = crate::BitReader;
#[doc = "Field `G_VBUSVALIDFLTR` reader - "]
pub type G_VBUSVALIDFLTR_R = crate::BitReader;
#[doc = "Field `G_AVALIDFLTR` reader - "]
pub type G_AVALIDFLTR_R = crate::BitReader;
#[doc = "Field `G_BVALIDFLTR` reader - "]
pub type G_BVALIDFLTR_R = crate::BitReader;
#[doc = "Field `G_SESSENDFLTR` reader - "]
pub type G_SESSENDFLTR_R = crate::BitReader;
#[doc = "Field `G_DEDFIFOMODE` reader - "]
pub type G_DEDFIFOMODE_R = crate::BitReader;
#[doc = "Field `G_INEPS` reader - "]
pub type G_INEPS_R = crate::FieldReader;
#[doc = "Field `G_DESCDMAENABLED` reader - "]
pub type G_DESCDMAENABLED_R = crate::BitReader;
#[doc = "Field `G_DESCDMA` reader - "]
pub type G_DESCDMA_R = crate::BitReader;
impl R {
    #[doc = "Bits 0:3"]
    #[inline(always)]
    pub fn g_numdevperioeps(&self) -> G_NUMDEVPERIOEPS_R {
        G_NUMDEVPERIOEPS_R::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bit 4"]
    #[inline(always)]
    pub fn g_partialpwrdn(&self) -> G_PARTIALPWRDN_R {
        G_PARTIALPWRDN_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5"]
    #[inline(always)]
    pub fn g_ahbfreq(&self) -> G_AHBFREQ_R {
        G_AHBFREQ_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6"]
    #[inline(always)]
    pub fn g_hibernation(&self) -> G_HIBERNATION_R {
        G_HIBERNATION_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    pub fn g_extendedhibernation(&self) -> G_EXTENDEDHIBERNATION_R {
        G_EXTENDEDHIBERNATION_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    pub fn g_acgsupt(&self) -> G_ACGSUPT_R {
        G_ACGSUPT_R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13"]
    #[inline(always)]
    pub fn g_enhancedlpmsupt(&self) -> G_ENHANCEDLPMSUPT_R {
        G_ENHANCEDLPMSUPT_R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bits 14:15"]
    #[inline(always)]
    pub fn g_phydatawidth(&self) -> G_PHYDATAWIDTH_R {
        G_PHYDATAWIDTH_R::new(((self.bits >> 14) & 3) as u8)
    }
    #[doc = "Bits 16:19"]
    #[inline(always)]
    pub fn g_numctleps(&self) -> G_NUMCTLEPS_R {
        G_NUMCTLEPS_R::new(((self.bits >> 16) & 0x0f) as u8)
    }
    #[doc = "Bit 20"]
    #[inline(always)]
    pub fn g_iddqfltr(&self) -> G_IDDQFLTR_R {
        G_IDDQFLTR_R::new(((self.bits >> 20) & 1) != 0)
    }
    #[doc = "Bit 21"]
    #[inline(always)]
    pub fn g_vbusvalidfltr(&self) -> G_VBUSVALIDFLTR_R {
        G_VBUSVALIDFLTR_R::new(((self.bits >> 21) & 1) != 0)
    }
    #[doc = "Bit 22"]
    #[inline(always)]
    pub fn g_avalidfltr(&self) -> G_AVALIDFLTR_R {
        G_AVALIDFLTR_R::new(((self.bits >> 22) & 1) != 0)
    }
    #[doc = "Bit 23"]
    #[inline(always)]
    pub fn g_bvalidfltr(&self) -> G_BVALIDFLTR_R {
        G_BVALIDFLTR_R::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bit 24"]
    #[inline(always)]
    pub fn g_sessendfltr(&self) -> G_SESSENDFLTR_R {
        G_SESSENDFLTR_R::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25"]
    #[inline(always)]
    pub fn g_dedfifomode(&self) -> G_DEDFIFOMODE_R {
        G_DEDFIFOMODE_R::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bits 26:29"]
    #[inline(always)]
    pub fn g_ineps(&self) -> G_INEPS_R {
        G_INEPS_R::new(((self.bits >> 26) & 0x0f) as u8)
    }
    #[doc = "Bit 30"]
    #[inline(always)]
    pub fn g_descdmaenabled(&self) -> G_DESCDMAENABLED_R {
        G_DESCDMAENABLED_R::new(((self.bits >> 30) & 1) != 0)
    }
    #[doc = "Bit 31"]
    #[inline(always)]
    pub fn g_descdma(&self) -> G_DESCDMA_R {
        G_DESCDMA_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("GHWCFG4")
            .field(
                "g_numdevperioeps",
                &format_args!("{}", self.g_numdevperioeps().bits()),
            )
            .field(
                "g_partialpwrdn",
                &format_args!("{}", self.g_partialpwrdn().bit()),
            )
            .field("g_ahbfreq", &format_args!("{}", self.g_ahbfreq().bit()))
            .field(
                "g_hibernation",
                &format_args!("{}", self.g_hibernation().bit()),
            )
            .field(
                "g_extendedhibernation",
                &format_args!("{}", self.g_extendedhibernation().bit()),
            )
            .field("g_acgsupt", &format_args!("{}", self.g_acgsupt().bit()))
            .field(
                "g_enhancedlpmsupt",
                &format_args!("{}", self.g_enhancedlpmsupt().bit()),
            )
            .field(
                "g_phydatawidth",
                &format_args!("{}", self.g_phydatawidth().bits()),
            )
            .field(
                "g_numctleps",
                &format_args!("{}", self.g_numctleps().bits()),
            )
            .field("g_iddqfltr", &format_args!("{}", self.g_iddqfltr().bit()))
            .field(
                "g_vbusvalidfltr",
                &format_args!("{}", self.g_vbusvalidfltr().bit()),
            )
            .field(
                "g_avalidfltr",
                &format_args!("{}", self.g_avalidfltr().bit()),
            )
            .field(
                "g_bvalidfltr",
                &format_args!("{}", self.g_bvalidfltr().bit()),
            )
            .field(
                "g_sessendfltr",
                &format_args!("{}", self.g_sessendfltr().bit()),
            )
            .field(
                "g_dedfifomode",
                &format_args!("{}", self.g_dedfifomode().bit()),
            )
            .field("g_ineps", &format_args!("{}", self.g_ineps().bits()))
            .field(
                "g_descdmaenabled",
                &format_args!("{}", self.g_descdmaenabled().bit()),
            )
            .field("g_descdma", &format_args!("{}", self.g_descdma().bit()))
            .finish()
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for crate::generic::Reg<GHWCFG4_SPEC> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        self.read().fmt(f)
    }
}
#[doc = "\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ghwcfg4::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct GHWCFG4_SPEC;
impl crate::RegisterSpec for GHWCFG4_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`ghwcfg4::R`](R) reader structure"]
impl crate::Readable for GHWCFG4_SPEC {}
#[doc = "`reset()` method sets GHWCFG4 to value 0xd3f0_a030"]
impl crate::Resettable for GHWCFG4_SPEC {
    const RESET_VALUE: Self::Ux = 0xd3f0_a030;
}