d1_pac/audio_codec/
hp2.rs

1#[doc = "Register `hp2` reader"]
2pub type R = crate::R<HP2_SPEC>;
3#[doc = "Register `hp2` writer"]
4pub type W = crate::W<HP2_SPEC>;
5#[doc = "Field `hpfb_buf_output_current` reader - Headphone Feedback Buffer Output Current Select\n\nI = 7uA"]
6pub type HPFB_BUF_OUTPUT_CURRENT_R = crate::FieldReader<HPFB_BUF_OUTPUT_CURRENT_A>;
7#[doc = "Headphone Feedback Buffer Output Current Select\n\nI = 7uA\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9#[repr(u8)]
10pub enum HPFB_BUF_OUTPUT_CURRENT_A {
11    #[doc = "0: `0`"]
12    I35 = 0,
13    #[doc = "1: `1`"]
14    I28 = 1,
15    #[doc = "2: `10`"]
16    I45 = 2,
17    #[doc = "3: `11`"]
18    I38 = 3,
19}
20impl From<HPFB_BUF_OUTPUT_CURRENT_A> for u8 {
21    #[inline(always)]
22    fn from(variant: HPFB_BUF_OUTPUT_CURRENT_A) -> Self {
23        variant as _
24    }
25}
26impl crate::FieldSpec for HPFB_BUF_OUTPUT_CURRENT_A {
27    type Ux = u8;
28}
29impl HPFB_BUF_OUTPUT_CURRENT_R {
30    #[doc = "Get enumerated values variant"]
31    #[inline(always)]
32    pub const fn variant(&self) -> HPFB_BUF_OUTPUT_CURRENT_A {
33        match self.bits {
34            0 => HPFB_BUF_OUTPUT_CURRENT_A::I35,
35            1 => HPFB_BUF_OUTPUT_CURRENT_A::I28,
36            2 => HPFB_BUF_OUTPUT_CURRENT_A::I45,
37            3 => HPFB_BUF_OUTPUT_CURRENT_A::I38,
38            _ => unreachable!(),
39        }
40    }
41    #[doc = "`0`"]
42    #[inline(always)]
43    pub fn is_i35(&self) -> bool {
44        *self == HPFB_BUF_OUTPUT_CURRENT_A::I35
45    }
46    #[doc = "`1`"]
47    #[inline(always)]
48    pub fn is_i28(&self) -> bool {
49        *self == HPFB_BUF_OUTPUT_CURRENT_A::I28
50    }
51    #[doc = "`10`"]
52    #[inline(always)]
53    pub fn is_i45(&self) -> bool {
54        *self == HPFB_BUF_OUTPUT_CURRENT_A::I45
55    }
56    #[doc = "`11`"]
57    #[inline(always)]
58    pub fn is_i38(&self) -> bool {
59        *self == HPFB_BUF_OUTPUT_CURRENT_A::I38
60    }
61}
62#[doc = "Field `hpfb_buf_output_current` writer - Headphone Feedback Buffer Output Current Select\n\nI = 7uA"]
63pub type HPFB_BUF_OUTPUT_CURRENT_W<'a, REG> =
64    crate::FieldWriterSafe<'a, REG, 2, HPFB_BUF_OUTPUT_CURRENT_A>;
65impl<'a, REG> HPFB_BUF_OUTPUT_CURRENT_W<'a, REG>
66where
67    REG: crate::Writable + crate::RegisterSpec,
68    REG::Ux: From<u8>,
69{
70    #[doc = "`0`"]
71    #[inline(always)]
72    pub fn i35(self) -> &'a mut crate::W<REG> {
73        self.variant(HPFB_BUF_OUTPUT_CURRENT_A::I35)
74    }
75    #[doc = "`1`"]
76    #[inline(always)]
77    pub fn i28(self) -> &'a mut crate::W<REG> {
78        self.variant(HPFB_BUF_OUTPUT_CURRENT_A::I28)
79    }
80    #[doc = "`10`"]
81    #[inline(always)]
82    pub fn i45(self) -> &'a mut crate::W<REG> {
83        self.variant(HPFB_BUF_OUTPUT_CURRENT_A::I45)
84    }
85    #[doc = "`11`"]
86    #[inline(always)]
87    pub fn i38(self) -> &'a mut crate::W<REG> {
88        self.variant(HPFB_BUF_OUTPUT_CURRENT_A::I38)
89    }
90}
91#[doc = "Field `ramp_final_state_res` reader - Ramp Final State Resistor"]
92pub type RAMP_FINAL_STATE_RES_R = crate::FieldReader<RAMP_FINAL_STATE_RES_A>;
93#[doc = "Ramp Final State Resistor\n\nValue on reset: 0"]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95#[repr(u8)]
96pub enum RAMP_FINAL_STATE_RES_A {
97    #[doc = "0: `0`"]
98    R2500 = 0,
99    #[doc = "1: `1`"]
100    R5K = 1,
101    #[doc = "2: `10`"]
102    R10K = 2,
103    #[doc = "3: `11`"]
104    R20K = 3,
105}
106impl From<RAMP_FINAL_STATE_RES_A> for u8 {
107    #[inline(always)]
108    fn from(variant: RAMP_FINAL_STATE_RES_A) -> Self {
109        variant as _
110    }
111}
112impl crate::FieldSpec for RAMP_FINAL_STATE_RES_A {
113    type Ux = u8;
114}
115impl RAMP_FINAL_STATE_RES_R {
116    #[doc = "Get enumerated values variant"]
117    #[inline(always)]
118    pub const fn variant(&self) -> RAMP_FINAL_STATE_RES_A {
119        match self.bits {
120            0 => RAMP_FINAL_STATE_RES_A::R2500,
121            1 => RAMP_FINAL_STATE_RES_A::R5K,
122            2 => RAMP_FINAL_STATE_RES_A::R10K,
123            3 => RAMP_FINAL_STATE_RES_A::R20K,
124            _ => unreachable!(),
125        }
126    }
127    #[doc = "`0`"]
128    #[inline(always)]
129    pub fn is_r2500(&self) -> bool {
130        *self == RAMP_FINAL_STATE_RES_A::R2500
131    }
132    #[doc = "`1`"]
133    #[inline(always)]
134    pub fn is_r5k(&self) -> bool {
135        *self == RAMP_FINAL_STATE_RES_A::R5K
136    }
137    #[doc = "`10`"]
138    #[inline(always)]
139    pub fn is_r10k(&self) -> bool {
140        *self == RAMP_FINAL_STATE_RES_A::R10K
141    }
142    #[doc = "`11`"]
143    #[inline(always)]
144    pub fn is_r20k(&self) -> bool {
145        *self == RAMP_FINAL_STATE_RES_A::R20K
146    }
147}
148#[doc = "Field `ramp_final_state_res` writer - Ramp Final State Resistor"]
149pub type RAMP_FINAL_STATE_RES_W<'a, REG> =
150    crate::FieldWriterSafe<'a, REG, 2, RAMP_FINAL_STATE_RES_A>;
151impl<'a, REG> RAMP_FINAL_STATE_RES_W<'a, REG>
152where
153    REG: crate::Writable + crate::RegisterSpec,
154    REG::Ux: From<u8>,
155{
156    #[doc = "`0`"]
157    #[inline(always)]
158    pub fn r2500(self) -> &'a mut crate::W<REG> {
159        self.variant(RAMP_FINAL_STATE_RES_A::R2500)
160    }
161    #[doc = "`1`"]
162    #[inline(always)]
163    pub fn r5k(self) -> &'a mut crate::W<REG> {
164        self.variant(RAMP_FINAL_STATE_RES_A::R5K)
165    }
166    #[doc = "`10`"]
167    #[inline(always)]
168    pub fn r10k(self) -> &'a mut crate::W<REG> {
169        self.variant(RAMP_FINAL_STATE_RES_A::R10K)
170    }
171    #[doc = "`11`"]
172    #[inline(always)]
173    pub fn r20k(self) -> &'a mut crate::W<REG> {
174        self.variant(RAMP_FINAL_STATE_RES_A::R20K)
175    }
176}
177#[doc = "Field `ramp_out_en` reader - Ramp Output Switch Enable"]
178pub type RAMP_OUT_EN_R = crate::BitReader<RAMP_OUT_EN_A>;
179#[doc = "Ramp Output Switch Enable\n\nValue on reset: 0"]
180#[derive(Clone, Copy, Debug, PartialEq, Eq)]
181pub enum RAMP_OUT_EN_A {
182    #[doc = "0: `0`"]
183    DISABLE = 0,
184    #[doc = "1: `1`"]
185    ENABLE = 1,
186}
187impl From<RAMP_OUT_EN_A> for bool {
188    #[inline(always)]
189    fn from(variant: RAMP_OUT_EN_A) -> Self {
190        variant as u8 != 0
191    }
192}
193impl RAMP_OUT_EN_R {
194    #[doc = "Get enumerated values variant"]
195    #[inline(always)]
196    pub const fn variant(&self) -> RAMP_OUT_EN_A {
197        match self.bits {
198            false => RAMP_OUT_EN_A::DISABLE,
199            true => RAMP_OUT_EN_A::ENABLE,
200        }
201    }
202    #[doc = "`0`"]
203    #[inline(always)]
204    pub fn is_disable(&self) -> bool {
205        *self == RAMP_OUT_EN_A::DISABLE
206    }
207    #[doc = "`1`"]
208    #[inline(always)]
209    pub fn is_enable(&self) -> bool {
210        *self == RAMP_OUT_EN_A::ENABLE
211    }
212}
213#[doc = "Field `ramp_out_en` writer - Ramp Output Switch Enable"]
214pub type RAMP_OUT_EN_W<'a, REG> = crate::BitWriter<'a, REG, RAMP_OUT_EN_A>;
215impl<'a, REG> RAMP_OUT_EN_W<'a, REG>
216where
217    REG: crate::Writable + crate::RegisterSpec,
218{
219    #[doc = "`0`"]
220    #[inline(always)]
221    pub fn disable(self) -> &'a mut crate::W<REG> {
222        self.variant(RAMP_OUT_EN_A::DISABLE)
223    }
224    #[doc = "`1`"]
225    #[inline(always)]
226    pub fn enable(self) -> &'a mut crate::W<REG> {
227        self.variant(RAMP_OUT_EN_A::ENABLE)
228    }
229}
230#[doc = "Field `ramp_final_control` reader - Headphone Ramp Final Step Control"]
231pub type RAMP_FINAL_CONTROL_R = crate::BitReader<RAMP_FINAL_CONTROL_A>;
232#[doc = "Headphone Ramp Final Step Control\n\nValue on reset: 0"]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum RAMP_FINAL_CONTROL_A {
235    #[doc = "0: `0`"]
236    SELECT_RAMP = 0,
237    #[doc = "1: `1`"]
238    SELECT_HPFB_BUFFER = 1,
239}
240impl From<RAMP_FINAL_CONTROL_A> for bool {
241    #[inline(always)]
242    fn from(variant: RAMP_FINAL_CONTROL_A) -> Self {
243        variant as u8 != 0
244    }
245}
246impl RAMP_FINAL_CONTROL_R {
247    #[doc = "Get enumerated values variant"]
248    #[inline(always)]
249    pub const fn variant(&self) -> RAMP_FINAL_CONTROL_A {
250        match self.bits {
251            false => RAMP_FINAL_CONTROL_A::SELECT_RAMP,
252            true => RAMP_FINAL_CONTROL_A::SELECT_HPFB_BUFFER,
253        }
254    }
255    #[doc = "`0`"]
256    #[inline(always)]
257    pub fn is_select_ramp(&self) -> bool {
258        *self == RAMP_FINAL_CONTROL_A::SELECT_RAMP
259    }
260    #[doc = "`1`"]
261    #[inline(always)]
262    pub fn is_select_hpfb_buffer(&self) -> bool {
263        *self == RAMP_FINAL_CONTROL_A::SELECT_HPFB_BUFFER
264    }
265}
266#[doc = "Field `ramp_final_control` writer - Headphone Ramp Final Step Control"]
267pub type RAMP_FINAL_CONTROL_W<'a, REG> = crate::BitWriter<'a, REG, RAMP_FINAL_CONTROL_A>;
268impl<'a, REG> RAMP_FINAL_CONTROL_W<'a, REG>
269where
270    REG: crate::Writable + crate::RegisterSpec,
271{
272    #[doc = "`0`"]
273    #[inline(always)]
274    pub fn select_ramp(self) -> &'a mut crate::W<REG> {
275        self.variant(RAMP_FINAL_CONTROL_A::SELECT_RAMP)
276    }
277    #[doc = "`1`"]
278    #[inline(always)]
279    pub fn select_hpfb_buffer(self) -> &'a mut crate::W<REG> {
280        self.variant(RAMP_FINAL_CONTROL_A::SELECT_HPFB_BUFFER)
281    }
282}
283#[doc = "Field `hpfb_in_en` reader - Headphone Feedback PAD IN Switch Enable"]
284pub type HPFB_IN_EN_R = crate::BitReader<HPFB_IN_EN_A>;
285#[doc = "Headphone Feedback PAD IN Switch Enable\n\nValue on reset: 0"]
286#[derive(Clone, Copy, Debug, PartialEq, Eq)]
287pub enum HPFB_IN_EN_A {
288    #[doc = "0: `0`"]
289    DISABLE = 0,
290    #[doc = "1: `1`"]
291    ENABLE = 1,
292}
293impl From<HPFB_IN_EN_A> for bool {
294    #[inline(always)]
295    fn from(variant: HPFB_IN_EN_A) -> Self {
296        variant as u8 != 0
297    }
298}
299impl HPFB_IN_EN_R {
300    #[doc = "Get enumerated values variant"]
301    #[inline(always)]
302    pub const fn variant(&self) -> HPFB_IN_EN_A {
303        match self.bits {
304            false => HPFB_IN_EN_A::DISABLE,
305            true => HPFB_IN_EN_A::ENABLE,
306        }
307    }
308    #[doc = "`0`"]
309    #[inline(always)]
310    pub fn is_disable(&self) -> bool {
311        *self == HPFB_IN_EN_A::DISABLE
312    }
313    #[doc = "`1`"]
314    #[inline(always)]
315    pub fn is_enable(&self) -> bool {
316        *self == HPFB_IN_EN_A::ENABLE
317    }
318}
319#[doc = "Field `hpfb_in_en` writer - Headphone Feedback PAD IN Switch Enable"]
320pub type HPFB_IN_EN_W<'a, REG> = crate::BitWriter<'a, REG, HPFB_IN_EN_A>;
321impl<'a, REG> HPFB_IN_EN_W<'a, REG>
322where
323    REG: crate::Writable + crate::RegisterSpec,
324{
325    #[doc = "`0`"]
326    #[inline(always)]
327    pub fn disable(self) -> &'a mut crate::W<REG> {
328        self.variant(HPFB_IN_EN_A::DISABLE)
329    }
330    #[doc = "`1`"]
331    #[inline(always)]
332    pub fn enable(self) -> &'a mut crate::W<REG> {
333        self.variant(HPFB_IN_EN_A::ENABLE)
334    }
335}
336#[doc = "Field `rampen` reader - Ramp DAC Enable"]
337pub type RAMPEN_R = crate::BitReader<RAMPEN_A>;
338#[doc = "Ramp DAC Enable\n\nValue on reset: 0"]
339#[derive(Clone, Copy, Debug, PartialEq, Eq)]
340pub enum RAMPEN_A {
341    #[doc = "0: `0`"]
342    DISABLE = 0,
343    #[doc = "1: `1`"]
344    ENABLE = 1,
345}
346impl From<RAMPEN_A> for bool {
347    #[inline(always)]
348    fn from(variant: RAMPEN_A) -> Self {
349        variant as u8 != 0
350    }
351}
352impl RAMPEN_R {
353    #[doc = "Get enumerated values variant"]
354    #[inline(always)]
355    pub const fn variant(&self) -> RAMPEN_A {
356        match self.bits {
357            false => RAMPEN_A::DISABLE,
358            true => RAMPEN_A::ENABLE,
359        }
360    }
361    #[doc = "`0`"]
362    #[inline(always)]
363    pub fn is_disable(&self) -> bool {
364        *self == RAMPEN_A::DISABLE
365    }
366    #[doc = "`1`"]
367    #[inline(always)]
368    pub fn is_enable(&self) -> bool {
369        *self == RAMPEN_A::ENABLE
370    }
371}
372#[doc = "Field `rampen` writer - Ramp DAC Enable"]
373pub type RAMPEN_W<'a, REG> = crate::BitWriter<'a, REG, RAMPEN_A>;
374impl<'a, REG> RAMPEN_W<'a, REG>
375where
376    REG: crate::Writable + crate::RegisterSpec,
377{
378    #[doc = "`0`"]
379    #[inline(always)]
380    pub fn disable(self) -> &'a mut crate::W<REG> {
381        self.variant(RAMPEN_A::DISABLE)
382    }
383    #[doc = "`1`"]
384    #[inline(always)]
385    pub fn enable(self) -> &'a mut crate::W<REG> {
386        self.variant(RAMPEN_A::ENABLE)
387    }
388}
389#[doc = "Field `rswitch` reader - RSwitch"]
390pub type RSWITCH_R = crate::BitReader<RSWITCH_A>;
391#[doc = "RSwitch\n\nValue on reset: 0"]
392#[derive(Clone, Copy, Debug, PartialEq, Eq)]
393pub enum RSWITCH_A {
394    #[doc = "0: `0`"]
395    HPOUT = 0,
396    #[doc = "1: `1`"]
397    VRA1 = 1,
398}
399impl From<RSWITCH_A> for bool {
400    #[inline(always)]
401    fn from(variant: RSWITCH_A) -> Self {
402        variant as u8 != 0
403    }
404}
405impl RSWITCH_R {
406    #[doc = "Get enumerated values variant"]
407    #[inline(always)]
408    pub const fn variant(&self) -> RSWITCH_A {
409        match self.bits {
410            false => RSWITCH_A::HPOUT,
411            true => RSWITCH_A::VRA1,
412        }
413    }
414    #[doc = "`0`"]
415    #[inline(always)]
416    pub fn is_hpout(&self) -> bool {
417        *self == RSWITCH_A::HPOUT
418    }
419    #[doc = "`1`"]
420    #[inline(always)]
421    pub fn is_vra1(&self) -> bool {
422        *self == RSWITCH_A::VRA1
423    }
424}
425#[doc = "Field `rswitch` writer - RSwitch"]
426pub type RSWITCH_W<'a, REG> = crate::BitWriter<'a, REG, RSWITCH_A>;
427impl<'a, REG> RSWITCH_W<'a, REG>
428where
429    REG: crate::Writable + crate::RegisterSpec,
430{
431    #[doc = "`0`"]
432    #[inline(always)]
433    pub fn hpout(self) -> &'a mut crate::W<REG> {
434        self.variant(RSWITCH_A::HPOUT)
435    }
436    #[doc = "`1`"]
437    #[inline(always)]
438    pub fn vra1(self) -> &'a mut crate::W<REG> {
439        self.variant(RSWITCH_A::VRA1)
440    }
441}
442#[doc = "Field `hp_drvouten` reader - Headphone Driver Output Enable"]
443pub type HP_DRVOUTEN_R = crate::BitReader<HP_DRVOUTEN_A>;
444#[doc = "Headphone Driver Output Enable\n\nValue on reset: 0"]
445#[derive(Clone, Copy, Debug, PartialEq, Eq)]
446pub enum HP_DRVOUTEN_A {
447    #[doc = "0: `0`"]
448    DISABLE = 0,
449    #[doc = "1: `1`"]
450    ENABLE = 1,
451}
452impl From<HP_DRVOUTEN_A> for bool {
453    #[inline(always)]
454    fn from(variant: HP_DRVOUTEN_A) -> Self {
455        variant as u8 != 0
456    }
457}
458impl HP_DRVOUTEN_R {
459    #[doc = "Get enumerated values variant"]
460    #[inline(always)]
461    pub const fn variant(&self) -> HP_DRVOUTEN_A {
462        match self.bits {
463            false => HP_DRVOUTEN_A::DISABLE,
464            true => HP_DRVOUTEN_A::ENABLE,
465        }
466    }
467    #[doc = "`0`"]
468    #[inline(always)]
469    pub fn is_disable(&self) -> bool {
470        *self == HP_DRVOUTEN_A::DISABLE
471    }
472    #[doc = "`1`"]
473    #[inline(always)]
474    pub fn is_enable(&self) -> bool {
475        *self == HP_DRVOUTEN_A::ENABLE
476    }
477}
478#[doc = "Field `hp_drvouten` writer - Headphone Driver Output Enable"]
479pub type HP_DRVOUTEN_W<'a, REG> = crate::BitWriter<'a, REG, HP_DRVOUTEN_A>;
480impl<'a, REG> HP_DRVOUTEN_W<'a, REG>
481where
482    REG: crate::Writable + crate::RegisterSpec,
483{
484    #[doc = "`0`"]
485    #[inline(always)]
486    pub fn disable(self) -> &'a mut crate::W<REG> {
487        self.variant(HP_DRVOUTEN_A::DISABLE)
488    }
489    #[doc = "`1`"]
490    #[inline(always)]
491    pub fn enable(self) -> &'a mut crate::W<REG> {
492        self.variant(HP_DRVOUTEN_A::ENABLE)
493    }
494}
495#[doc = "Field `hp_drven` reader - Headphone Driver Enable"]
496pub type HP_DRVEN_R = crate::BitReader<HP_DRVEN_A>;
497#[doc = "Headphone Driver Enable\n\nValue on reset: 0"]
498#[derive(Clone, Copy, Debug, PartialEq, Eq)]
499pub enum HP_DRVEN_A {
500    #[doc = "0: `0`"]
501    DISABLE = 0,
502    #[doc = "1: `1`"]
503    ENABLE = 1,
504}
505impl From<HP_DRVEN_A> for bool {
506    #[inline(always)]
507    fn from(variant: HP_DRVEN_A) -> Self {
508        variant as u8 != 0
509    }
510}
511impl HP_DRVEN_R {
512    #[doc = "Get enumerated values variant"]
513    #[inline(always)]
514    pub const fn variant(&self) -> HP_DRVEN_A {
515        match self.bits {
516            false => HP_DRVEN_A::DISABLE,
517            true => HP_DRVEN_A::ENABLE,
518        }
519    }
520    #[doc = "`0`"]
521    #[inline(always)]
522    pub fn is_disable(&self) -> bool {
523        *self == HP_DRVEN_A::DISABLE
524    }
525    #[doc = "`1`"]
526    #[inline(always)]
527    pub fn is_enable(&self) -> bool {
528        *self == HP_DRVEN_A::ENABLE
529    }
530}
531#[doc = "Field `hp_drven` writer - Headphone Driver Enable"]
532pub type HP_DRVEN_W<'a, REG> = crate::BitWriter<'a, REG, HP_DRVEN_A>;
533impl<'a, REG> HP_DRVEN_W<'a, REG>
534where
535    REG: crate::Writable + crate::RegisterSpec,
536{
537    #[doc = "`0`"]
538    #[inline(always)]
539    pub fn disable(self) -> &'a mut crate::W<REG> {
540        self.variant(HP_DRVEN_A::DISABLE)
541    }
542    #[doc = "`1`"]
543    #[inline(always)]
544    pub fn enable(self) -> &'a mut crate::W<REG> {
545        self.variant(HP_DRVEN_A::ENABLE)
546    }
547}
548#[doc = "Field `iophp` reader - Headphone L/R OP Bias Current Select"]
549pub type IOPHP_R = crate::FieldReader<IOPHP_A>;
550#[doc = "Headphone L/R OP Bias Current Select\n\nValue on reset: 0"]
551#[derive(Clone, Copy, Debug, PartialEq, Eq)]
552#[repr(u8)]
553pub enum IOPHP_A {
554    #[doc = "0: `0`"]
555    C6U = 0,
556    #[doc = "1: `1`"]
557    C7U = 1,
558    #[doc = "2: `10`"]
559    C8U = 2,
560    #[doc = "3: `11`"]
561    C9U = 3,
562}
563impl From<IOPHP_A> for u8 {
564    #[inline(always)]
565    fn from(variant: IOPHP_A) -> Self {
566        variant as _
567    }
568}
569impl crate::FieldSpec for IOPHP_A {
570    type Ux = u8;
571}
572impl IOPHP_R {
573    #[doc = "Get enumerated values variant"]
574    #[inline(always)]
575    pub const fn variant(&self) -> IOPHP_A {
576        match self.bits {
577            0 => IOPHP_A::C6U,
578            1 => IOPHP_A::C7U,
579            2 => IOPHP_A::C8U,
580            3 => IOPHP_A::C9U,
581            _ => unreachable!(),
582        }
583    }
584    #[doc = "`0`"]
585    #[inline(always)]
586    pub fn is_c6u(&self) -> bool {
587        *self == IOPHP_A::C6U
588    }
589    #[doc = "`1`"]
590    #[inline(always)]
591    pub fn is_c7u(&self) -> bool {
592        *self == IOPHP_A::C7U
593    }
594    #[doc = "`10`"]
595    #[inline(always)]
596    pub fn is_c8u(&self) -> bool {
597        *self == IOPHP_A::C8U
598    }
599    #[doc = "`11`"]
600    #[inline(always)]
601    pub fn is_c9u(&self) -> bool {
602        *self == IOPHP_A::C9U
603    }
604}
605#[doc = "Field `iophp` writer - Headphone L/R OP Bias Current Select"]
606pub type IOPHP_W<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, IOPHP_A>;
607impl<'a, REG> IOPHP_W<'a, REG>
608where
609    REG: crate::Writable + crate::RegisterSpec,
610    REG::Ux: From<u8>,
611{
612    #[doc = "`0`"]
613    #[inline(always)]
614    pub fn c6u(self) -> &'a mut crate::W<REG> {
615        self.variant(IOPHP_A::C6U)
616    }
617    #[doc = "`1`"]
618    #[inline(always)]
619    pub fn c7u(self) -> &'a mut crate::W<REG> {
620        self.variant(IOPHP_A::C7U)
621    }
622    #[doc = "`10`"]
623    #[inline(always)]
624    pub fn c8u(self) -> &'a mut crate::W<REG> {
625        self.variant(IOPHP_A::C8U)
626    }
627    #[doc = "`11`"]
628    #[inline(always)]
629    pub fn c9u(self) -> &'a mut crate::W<REG> {
630        self.variant(IOPHP_A::C9U)
631    }
632}
633#[doc = "Field `opdrv_cur` reader - Headphone OP Output Stage Current Setting"]
634pub type OPDRV_CUR_R = crate::FieldReader<OPDRV_CUR_A>;
635#[doc = "Headphone OP Output Stage Current Setting\n\nValue on reset: 0"]
636#[derive(Clone, Copy, Debug, PartialEq, Eq)]
637#[repr(u8)]
638pub enum OPDRV_CUR_A {
639    #[doc = "0: `0`"]
640    MIN = 0,
641    #[doc = "3: `11`"]
642    MAX = 3,
643}
644impl From<OPDRV_CUR_A> for u8 {
645    #[inline(always)]
646    fn from(variant: OPDRV_CUR_A) -> Self {
647        variant as _
648    }
649}
650impl crate::FieldSpec for OPDRV_CUR_A {
651    type Ux = u8;
652}
653impl OPDRV_CUR_R {
654    #[doc = "Get enumerated values variant"]
655    #[inline(always)]
656    pub const fn variant(&self) -> Option<OPDRV_CUR_A> {
657        match self.bits {
658            0 => Some(OPDRV_CUR_A::MIN),
659            3 => Some(OPDRV_CUR_A::MAX),
660            _ => None,
661        }
662    }
663    #[doc = "`0`"]
664    #[inline(always)]
665    pub fn is_min(&self) -> bool {
666        *self == OPDRV_CUR_A::MIN
667    }
668    #[doc = "`11`"]
669    #[inline(always)]
670    pub fn is_max(&self) -> bool {
671        *self == OPDRV_CUR_A::MAX
672    }
673}
674#[doc = "Field `opdrv_cur` writer - Headphone OP Output Stage Current Setting"]
675pub type OPDRV_CUR_W<'a, REG> = crate::FieldWriter<'a, REG, 2, OPDRV_CUR_A>;
676impl<'a, REG> OPDRV_CUR_W<'a, REG>
677where
678    REG: crate::Writable + crate::RegisterSpec,
679    REG::Ux: From<u8>,
680{
681    #[doc = "`0`"]
682    #[inline(always)]
683    pub fn min(self) -> &'a mut crate::W<REG> {
684        self.variant(OPDRV_CUR_A::MIN)
685    }
686    #[doc = "`11`"]
687    #[inline(always)]
688    pub fn max(self) -> &'a mut crate::W<REG> {
689        self.variant(OPDRV_CUR_A::MAX)
690    }
691}
692#[doc = "Field `hpfb_res` reader - Headphone Feedback Big Resistor Control"]
693pub type HPFB_RES_R = crate::FieldReader<HPFB_RES_A>;
694#[doc = "Headphone Feedback Big Resistor Control\n\nValue on reset: 0"]
695#[derive(Clone, Copy, Debug, PartialEq, Eq)]
696#[repr(u8)]
697pub enum HPFB_RES_A {
698    #[doc = "0: `0`"]
699    R880K = 0,
700    #[doc = "1: `1`"]
701    R1000K = 1,
702    #[doc = "2: `10`"]
703    R1080K = 2,
704    #[doc = "3: `11`"]
705    R1200K = 3,
706}
707impl From<HPFB_RES_A> for u8 {
708    #[inline(always)]
709    fn from(variant: HPFB_RES_A) -> Self {
710        variant as _
711    }
712}
713impl crate::FieldSpec for HPFB_RES_A {
714    type Ux = u8;
715}
716impl HPFB_RES_R {
717    #[doc = "Get enumerated values variant"]
718    #[inline(always)]
719    pub const fn variant(&self) -> HPFB_RES_A {
720        match self.bits {
721            0 => HPFB_RES_A::R880K,
722            1 => HPFB_RES_A::R1000K,
723            2 => HPFB_RES_A::R1080K,
724            3 => HPFB_RES_A::R1200K,
725            _ => unreachable!(),
726        }
727    }
728    #[doc = "`0`"]
729    #[inline(always)]
730    pub fn is_r880k(&self) -> bool {
731        *self == HPFB_RES_A::R880K
732    }
733    #[doc = "`1`"]
734    #[inline(always)]
735    pub fn is_r1000k(&self) -> bool {
736        *self == HPFB_RES_A::R1000K
737    }
738    #[doc = "`10`"]
739    #[inline(always)]
740    pub fn is_r1080k(&self) -> bool {
741        *self == HPFB_RES_A::R1080K
742    }
743    #[doc = "`11`"]
744    #[inline(always)]
745    pub fn is_r1200k(&self) -> bool {
746        *self == HPFB_RES_A::R1200K
747    }
748}
749#[doc = "Field `hpfb_res` writer - Headphone Feedback Big Resistor Control"]
750pub type HPFB_RES_W<'a, REG> = crate::FieldWriterSafe<'a, REG, 2, HPFB_RES_A>;
751impl<'a, REG> HPFB_RES_W<'a, REG>
752where
753    REG: crate::Writable + crate::RegisterSpec,
754    REG::Ux: From<u8>,
755{
756    #[doc = "`0`"]
757    #[inline(always)]
758    pub fn r880k(self) -> &'a mut crate::W<REG> {
759        self.variant(HPFB_RES_A::R880K)
760    }
761    #[doc = "`1`"]
762    #[inline(always)]
763    pub fn r1000k(self) -> &'a mut crate::W<REG> {
764        self.variant(HPFB_RES_A::R1000K)
765    }
766    #[doc = "`10`"]
767    #[inline(always)]
768    pub fn r1080k(self) -> &'a mut crate::W<REG> {
769        self.variant(HPFB_RES_A::R1080K)
770    }
771    #[doc = "`11`"]
772    #[inline(always)]
773    pub fn r1200k(self) -> &'a mut crate::W<REG> {
774        self.variant(HPFB_RES_A::R1200K)
775    }
776}
777#[doc = "Field `headphone_gain` reader - Headphone Gain"]
778pub type HEADPHONE_GAIN_R = crate::FieldReader<HEADPHONE_GAIN_A>;
779#[doc = "Headphone Gain\n\nValue on reset: 0"]
780#[derive(Clone, Copy, Debug, PartialEq, Eq)]
781#[repr(u8)]
782pub enum HEADPHONE_GAIN_A {
783    #[doc = "0: `0`"]
784    DB0 = 0,
785    #[doc = "1: `1`"]
786    DB6 = 1,
787    #[doc = "2: `10`"]
788    DB12 = 2,
789    #[doc = "3: `11`"]
790    DB18 = 3,
791    #[doc = "4: `100`"]
792    DB24 = 4,
793    #[doc = "5: `101`"]
794    DB30 = 5,
795    #[doc = "6: `110`"]
796    DB36 = 6,
797    #[doc = "7: `111`"]
798    DB42 = 7,
799}
800impl From<HEADPHONE_GAIN_A> for u8 {
801    #[inline(always)]
802    fn from(variant: HEADPHONE_GAIN_A) -> Self {
803        variant as _
804    }
805}
806impl crate::FieldSpec for HEADPHONE_GAIN_A {
807    type Ux = u8;
808}
809impl HEADPHONE_GAIN_R {
810    #[doc = "Get enumerated values variant"]
811    #[inline(always)]
812    pub const fn variant(&self) -> HEADPHONE_GAIN_A {
813        match self.bits {
814            0 => HEADPHONE_GAIN_A::DB0,
815            1 => HEADPHONE_GAIN_A::DB6,
816            2 => HEADPHONE_GAIN_A::DB12,
817            3 => HEADPHONE_GAIN_A::DB18,
818            4 => HEADPHONE_GAIN_A::DB24,
819            5 => HEADPHONE_GAIN_A::DB30,
820            6 => HEADPHONE_GAIN_A::DB36,
821            7 => HEADPHONE_GAIN_A::DB42,
822            _ => unreachable!(),
823        }
824    }
825    #[doc = "`0`"]
826    #[inline(always)]
827    pub fn is_db0(&self) -> bool {
828        *self == HEADPHONE_GAIN_A::DB0
829    }
830    #[doc = "`1`"]
831    #[inline(always)]
832    pub fn is_db6(&self) -> bool {
833        *self == HEADPHONE_GAIN_A::DB6
834    }
835    #[doc = "`10`"]
836    #[inline(always)]
837    pub fn is_db12(&self) -> bool {
838        *self == HEADPHONE_GAIN_A::DB12
839    }
840    #[doc = "`11`"]
841    #[inline(always)]
842    pub fn is_db18(&self) -> bool {
843        *self == HEADPHONE_GAIN_A::DB18
844    }
845    #[doc = "`100`"]
846    #[inline(always)]
847    pub fn is_db24(&self) -> bool {
848        *self == HEADPHONE_GAIN_A::DB24
849    }
850    #[doc = "`101`"]
851    #[inline(always)]
852    pub fn is_db30(&self) -> bool {
853        *self == HEADPHONE_GAIN_A::DB30
854    }
855    #[doc = "`110`"]
856    #[inline(always)]
857    pub fn is_db36(&self) -> bool {
858        *self == HEADPHONE_GAIN_A::DB36
859    }
860    #[doc = "`111`"]
861    #[inline(always)]
862    pub fn is_db42(&self) -> bool {
863        *self == HEADPHONE_GAIN_A::DB42
864    }
865}
866#[doc = "Field `headphone_gain` writer - Headphone Gain"]
867pub type HEADPHONE_GAIN_W<'a, REG> = crate::FieldWriterSafe<'a, REG, 3, HEADPHONE_GAIN_A>;
868impl<'a, REG> HEADPHONE_GAIN_W<'a, REG>
869where
870    REG: crate::Writable + crate::RegisterSpec,
871    REG::Ux: From<u8>,
872{
873    #[doc = "`0`"]
874    #[inline(always)]
875    pub fn db0(self) -> &'a mut crate::W<REG> {
876        self.variant(HEADPHONE_GAIN_A::DB0)
877    }
878    #[doc = "`1`"]
879    #[inline(always)]
880    pub fn db6(self) -> &'a mut crate::W<REG> {
881        self.variant(HEADPHONE_GAIN_A::DB6)
882    }
883    #[doc = "`10`"]
884    #[inline(always)]
885    pub fn db12(self) -> &'a mut crate::W<REG> {
886        self.variant(HEADPHONE_GAIN_A::DB12)
887    }
888    #[doc = "`11`"]
889    #[inline(always)]
890    pub fn db18(self) -> &'a mut crate::W<REG> {
891        self.variant(HEADPHONE_GAIN_A::DB18)
892    }
893    #[doc = "`100`"]
894    #[inline(always)]
895    pub fn db24(self) -> &'a mut crate::W<REG> {
896        self.variant(HEADPHONE_GAIN_A::DB24)
897    }
898    #[doc = "`101`"]
899    #[inline(always)]
900    pub fn db30(self) -> &'a mut crate::W<REG> {
901        self.variant(HEADPHONE_GAIN_A::DB30)
902    }
903    #[doc = "`110`"]
904    #[inline(always)]
905    pub fn db36(self) -> &'a mut crate::W<REG> {
906        self.variant(HEADPHONE_GAIN_A::DB36)
907    }
908    #[doc = "`111`"]
909    #[inline(always)]
910    pub fn db42(self) -> &'a mut crate::W<REG> {
911        self.variant(HEADPHONE_GAIN_A::DB42)
912    }
913}
914#[doc = "Field `hpfb_buf_en` reader - Headphone Feedback Buffer OP Enable"]
915pub type HPFB_BUF_EN_R = crate::BitReader<HPFB_BUF_EN_A>;
916#[doc = "Headphone Feedback Buffer OP Enable\n\nValue on reset: 0"]
917#[derive(Clone, Copy, Debug, PartialEq, Eq)]
918pub enum HPFB_BUF_EN_A {
919    #[doc = "0: `0`"]
920    DISABLE = 0,
921    #[doc = "1: `1`"]
922    ENABLE = 1,
923}
924impl From<HPFB_BUF_EN_A> for bool {
925    #[inline(always)]
926    fn from(variant: HPFB_BUF_EN_A) -> Self {
927        variant as u8 != 0
928    }
929}
930impl HPFB_BUF_EN_R {
931    #[doc = "Get enumerated values variant"]
932    #[inline(always)]
933    pub const fn variant(&self) -> HPFB_BUF_EN_A {
934        match self.bits {
935            false => HPFB_BUF_EN_A::DISABLE,
936            true => HPFB_BUF_EN_A::ENABLE,
937        }
938    }
939    #[doc = "`0`"]
940    #[inline(always)]
941    pub fn is_disable(&self) -> bool {
942        *self == HPFB_BUF_EN_A::DISABLE
943    }
944    #[doc = "`1`"]
945    #[inline(always)]
946    pub fn is_enable(&self) -> bool {
947        *self == HPFB_BUF_EN_A::ENABLE
948    }
949}
950#[doc = "Field `hpfb_buf_en` writer - Headphone Feedback Buffer OP Enable"]
951pub type HPFB_BUF_EN_W<'a, REG> = crate::BitWriter<'a, REG, HPFB_BUF_EN_A>;
952impl<'a, REG> HPFB_BUF_EN_W<'a, REG>
953where
954    REG: crate::Writable + crate::RegisterSpec,
955{
956    #[doc = "`0`"]
957    #[inline(always)]
958    pub fn disable(self) -> &'a mut crate::W<REG> {
959        self.variant(HPFB_BUF_EN_A::DISABLE)
960    }
961    #[doc = "`1`"]
962    #[inline(always)]
963    pub fn enable(self) -> &'a mut crate::W<REG> {
964        self.variant(HPFB_BUF_EN_A::ENABLE)
965    }
966}
967impl R {
968    #[doc = "Bits 8:9 - Headphone Feedback Buffer Output Current Select\n\nI = 7uA"]
969    #[inline(always)]
970    pub fn hpfb_buf_output_current(&self) -> HPFB_BUF_OUTPUT_CURRENT_R {
971        HPFB_BUF_OUTPUT_CURRENT_R::new(((self.bits >> 8) & 3) as u8)
972    }
973    #[doc = "Bits 13:14 - Ramp Final State Resistor"]
974    #[inline(always)]
975    pub fn ramp_final_state_res(&self) -> RAMP_FINAL_STATE_RES_R {
976        RAMP_FINAL_STATE_RES_R::new(((self.bits >> 13) & 3) as u8)
977    }
978    #[doc = "Bit 15 - Ramp Output Switch Enable"]
979    #[inline(always)]
980    pub fn ramp_out_en(&self) -> RAMP_OUT_EN_R {
981        RAMP_OUT_EN_R::new(((self.bits >> 15) & 1) != 0)
982    }
983    #[doc = "Bit 16 - Headphone Ramp Final Step Control"]
984    #[inline(always)]
985    pub fn ramp_final_control(&self) -> RAMP_FINAL_CONTROL_R {
986        RAMP_FINAL_CONTROL_R::new(((self.bits >> 16) & 1) != 0)
987    }
988    #[doc = "Bit 17 - Headphone Feedback PAD IN Switch Enable"]
989    #[inline(always)]
990    pub fn hpfb_in_en(&self) -> HPFB_IN_EN_R {
991        HPFB_IN_EN_R::new(((self.bits >> 17) & 1) != 0)
992    }
993    #[doc = "Bit 18 - Ramp DAC Enable"]
994    #[inline(always)]
995    pub fn rampen(&self) -> RAMPEN_R {
996        RAMPEN_R::new(((self.bits >> 18) & 1) != 0)
997    }
998    #[doc = "Bit 19 - RSwitch"]
999    #[inline(always)]
1000    pub fn rswitch(&self) -> RSWITCH_R {
1001        RSWITCH_R::new(((self.bits >> 19) & 1) != 0)
1002    }
1003    #[doc = "Bit 20 - Headphone Driver Output Enable"]
1004    #[inline(always)]
1005    pub fn hp_drvouten(&self) -> HP_DRVOUTEN_R {
1006        HP_DRVOUTEN_R::new(((self.bits >> 20) & 1) != 0)
1007    }
1008    #[doc = "Bit 21 - Headphone Driver Enable"]
1009    #[inline(always)]
1010    pub fn hp_drven(&self) -> HP_DRVEN_R {
1011        HP_DRVEN_R::new(((self.bits >> 21) & 1) != 0)
1012    }
1013    #[doc = "Bits 22:23 - Headphone L/R OP Bias Current Select"]
1014    #[inline(always)]
1015    pub fn iophp(&self) -> IOPHP_R {
1016        IOPHP_R::new(((self.bits >> 22) & 3) as u8)
1017    }
1018    #[doc = "Bits 24:25 - Headphone OP Output Stage Current Setting"]
1019    #[inline(always)]
1020    pub fn opdrv_cur(&self) -> OPDRV_CUR_R {
1021        OPDRV_CUR_R::new(((self.bits >> 24) & 3) as u8)
1022    }
1023    #[doc = "Bits 26:27 - Headphone Feedback Big Resistor Control"]
1024    #[inline(always)]
1025    pub fn hpfb_res(&self) -> HPFB_RES_R {
1026        HPFB_RES_R::new(((self.bits >> 26) & 3) as u8)
1027    }
1028    #[doc = "Bits 28:30 - Headphone Gain"]
1029    #[inline(always)]
1030    pub fn headphone_gain(&self) -> HEADPHONE_GAIN_R {
1031        HEADPHONE_GAIN_R::new(((self.bits >> 28) & 7) as u8)
1032    }
1033    #[doc = "Bit 31 - Headphone Feedback Buffer OP Enable"]
1034    #[inline(always)]
1035    pub fn hpfb_buf_en(&self) -> HPFB_BUF_EN_R {
1036        HPFB_BUF_EN_R::new(((self.bits >> 31) & 1) != 0)
1037    }
1038}
1039impl W {
1040    #[doc = "Bits 8:9 - Headphone Feedback Buffer Output Current Select\n\nI = 7uA"]
1041    #[inline(always)]
1042    #[must_use]
1043    pub fn hpfb_buf_output_current(&mut self) -> HPFB_BUF_OUTPUT_CURRENT_W<HP2_SPEC> {
1044        HPFB_BUF_OUTPUT_CURRENT_W::new(self, 8)
1045    }
1046    #[doc = "Bits 13:14 - Ramp Final State Resistor"]
1047    #[inline(always)]
1048    #[must_use]
1049    pub fn ramp_final_state_res(&mut self) -> RAMP_FINAL_STATE_RES_W<HP2_SPEC> {
1050        RAMP_FINAL_STATE_RES_W::new(self, 13)
1051    }
1052    #[doc = "Bit 15 - Ramp Output Switch Enable"]
1053    #[inline(always)]
1054    #[must_use]
1055    pub fn ramp_out_en(&mut self) -> RAMP_OUT_EN_W<HP2_SPEC> {
1056        RAMP_OUT_EN_W::new(self, 15)
1057    }
1058    #[doc = "Bit 16 - Headphone Ramp Final Step Control"]
1059    #[inline(always)]
1060    #[must_use]
1061    pub fn ramp_final_control(&mut self) -> RAMP_FINAL_CONTROL_W<HP2_SPEC> {
1062        RAMP_FINAL_CONTROL_W::new(self, 16)
1063    }
1064    #[doc = "Bit 17 - Headphone Feedback PAD IN Switch Enable"]
1065    #[inline(always)]
1066    #[must_use]
1067    pub fn hpfb_in_en(&mut self) -> HPFB_IN_EN_W<HP2_SPEC> {
1068        HPFB_IN_EN_W::new(self, 17)
1069    }
1070    #[doc = "Bit 18 - Ramp DAC Enable"]
1071    #[inline(always)]
1072    #[must_use]
1073    pub fn rampen(&mut self) -> RAMPEN_W<HP2_SPEC> {
1074        RAMPEN_W::new(self, 18)
1075    }
1076    #[doc = "Bit 19 - RSwitch"]
1077    #[inline(always)]
1078    #[must_use]
1079    pub fn rswitch(&mut self) -> RSWITCH_W<HP2_SPEC> {
1080        RSWITCH_W::new(self, 19)
1081    }
1082    #[doc = "Bit 20 - Headphone Driver Output Enable"]
1083    #[inline(always)]
1084    #[must_use]
1085    pub fn hp_drvouten(&mut self) -> HP_DRVOUTEN_W<HP2_SPEC> {
1086        HP_DRVOUTEN_W::new(self, 20)
1087    }
1088    #[doc = "Bit 21 - Headphone Driver Enable"]
1089    #[inline(always)]
1090    #[must_use]
1091    pub fn hp_drven(&mut self) -> HP_DRVEN_W<HP2_SPEC> {
1092        HP_DRVEN_W::new(self, 21)
1093    }
1094    #[doc = "Bits 22:23 - Headphone L/R OP Bias Current Select"]
1095    #[inline(always)]
1096    #[must_use]
1097    pub fn iophp(&mut self) -> IOPHP_W<HP2_SPEC> {
1098        IOPHP_W::new(self, 22)
1099    }
1100    #[doc = "Bits 24:25 - Headphone OP Output Stage Current Setting"]
1101    #[inline(always)]
1102    #[must_use]
1103    pub fn opdrv_cur(&mut self) -> OPDRV_CUR_W<HP2_SPEC> {
1104        OPDRV_CUR_W::new(self, 24)
1105    }
1106    #[doc = "Bits 26:27 - Headphone Feedback Big Resistor Control"]
1107    #[inline(always)]
1108    #[must_use]
1109    pub fn hpfb_res(&mut self) -> HPFB_RES_W<HP2_SPEC> {
1110        HPFB_RES_W::new(self, 26)
1111    }
1112    #[doc = "Bits 28:30 - Headphone Gain"]
1113    #[inline(always)]
1114    #[must_use]
1115    pub fn headphone_gain(&mut self) -> HEADPHONE_GAIN_W<HP2_SPEC> {
1116        HEADPHONE_GAIN_W::new(self, 28)
1117    }
1118    #[doc = "Bit 31 - Headphone Feedback Buffer OP Enable"]
1119    #[inline(always)]
1120    #[must_use]
1121    pub fn hpfb_buf_en(&mut self) -> HPFB_BUF_EN_W<HP2_SPEC> {
1122        HPFB_BUF_EN_W::new(self, 31)
1123    }
1124    #[doc = r" Writes raw bits to the register."]
1125    #[doc = r""]
1126    #[doc = r" # Safety"]
1127    #[doc = r""]
1128    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
1129    #[inline(always)]
1130    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1131        self.bits = bits;
1132        self
1133    }
1134}
1135#[doc = "Headphone2 Analog Control Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`hp2::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`hp2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1136pub struct HP2_SPEC;
1137impl crate::RegisterSpec for HP2_SPEC {
1138    type Ux = u32;
1139}
1140#[doc = "`read()` method returns [`hp2::R`](R) reader structure"]
1141impl crate::Readable for HP2_SPEC {}
1142#[doc = "`write(|w| ..)` method takes [`hp2::W`](W) writer structure"]
1143impl crate::Writable for HP2_SPEC {
1144    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1145    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1146}
1147#[doc = "`reset()` method sets hp2 to value 0"]
1148impl crate::Resettable for HP2_SPEC {
1149    const RESET_VALUE: Self::Ux = 0;
1150}