efm32pg12_pac/emu/
dcdczdetctrl.rs1#[doc = "Reader of register DCDCZDETCTRL"]
2pub type R = crate::R<u32, super::DCDCZDETCTRL>;
3#[doc = "Writer for register DCDCZDETCTRL"]
4pub type W = crate::W<u32, super::DCDCZDETCTRL>;
5#[doc = "Register DCDCZDETCTRL `reset()`'s with value 0x0150"]
6impl crate::ResetValue for super::DCDCZDETCTRL {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x0150
11 }
12}
13#[doc = "Reader of field `ZDETILIMSEL`"]
14pub type ZDETILIMSEL_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `ZDETILIMSEL`"]
16pub struct ZDETILIMSEL_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> ZDETILIMSEL_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4);
24 self.w
25 }
26}
27#[doc = "Reader of field `ZDETBLANKDLY`"]
28pub type ZDETBLANKDLY_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `ZDETBLANKDLY`"]
30pub struct ZDETBLANKDLY_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> ZDETBLANKDLY_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
38 self.w
39 }
40}
41impl R {
42 #[doc = "Bits 4:6 - Reverse Current Limit Level Selection for Zero Detector"]
43 #[inline(always)]
44 pub fn zdetilimsel(&self) -> ZDETILIMSEL_R {
45 ZDETILIMSEL_R::new(((self.bits >> 4) & 0x07) as u8)
46 }
47 #[doc = "Bits 8:9 - Reserved for internal use. Do not change."]
48 #[inline(always)]
49 pub fn zdetblankdly(&self) -> ZDETBLANKDLY_R {
50 ZDETBLANKDLY_R::new(((self.bits >> 8) & 0x03) as u8)
51 }
52}
53impl W {
54 #[doc = "Bits 4:6 - Reverse Current Limit Level Selection for Zero Detector"]
55 #[inline(always)]
56 pub fn zdetilimsel(&mut self) -> ZDETILIMSEL_W {
57 ZDETILIMSEL_W { w: self }
58 }
59 #[doc = "Bits 8:9 - Reserved for internal use. Do not change."]
60 #[inline(always)]
61 pub fn zdetblankdly(&mut self) -> ZDETBLANKDLY_W {
62 ZDETBLANKDLY_W { w: self }
63 }
64}