efm32pg12_pac/cmu/
dpllctrl1.rs1#[doc = "Reader of register DPLLCTRL1"]
2pub type R = crate::R<u32, super::DPLLCTRL1>;
3#[doc = "Writer for register DPLLCTRL1"]
4pub type W = crate::W<u32, super::DPLLCTRL1>;
5#[doc = "Register DPLLCTRL1 `reset()`'s with value 0"]
6impl crate::ResetValue for super::DPLLCTRL1 {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Reader of field `M`"]
14pub type M_R = crate::R<u16, u16>;
15#[doc = "Write proxy for field `M`"]
16pub struct M_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> M_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u16) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff);
24 self.w
25 }
26}
27#[doc = "Reader of field `N`"]
28pub type N_R = crate::R<u16, u16>;
29#[doc = "Write proxy for field `N`"]
30pub struct N_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> N_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u16) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0x0fff << 16)) | (((value as u32) & 0x0fff) << 16);
38 self.w
39 }
40}
41impl R {
42 #[doc = "Bits 0:11 - Factor M"]
43 #[inline(always)]
44 pub fn m(&self) -> M_R {
45 M_R::new((self.bits & 0x0fff) as u16)
46 }
47 #[doc = "Bits 16:27 - Factor N"]
48 #[inline(always)]
49 pub fn n(&self) -> N_R {
50 N_R::new(((self.bits >> 16) & 0x0fff) as u16)
51 }
52}
53impl W {
54 #[doc = "Bits 0:11 - Factor M"]
55 #[inline(always)]
56 pub fn m(&mut self) -> M_W {
57 M_W { w: self }
58 }
59 #[doc = "Bits 16:27 - Factor N"]
60 #[inline(always)]
61 pub fn n(&mut self) -> N_W {
62 N_W { w: self }
63 }
64}