bl702_pac/pds/
clkpll_sdm.rs

1#[doc = "Register `clkpll_sdm` reader"]
2pub struct R(crate::R<CLKPLL_SDM_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CLKPLL_SDM_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CLKPLL_SDM_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CLKPLL_SDM_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `clkpll_sdm` writer"]
17pub struct W(crate::W<CLKPLL_SDM_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<CLKPLL_SDM_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<CLKPLL_SDM_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<CLKPLL_SDM_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `clkpll_sdmin` reader - "]
38pub type CLKPLL_SDMIN_R = crate::FieldReader<u32, u32>;
39#[doc = "Field `clkpll_sdmin` writer - "]
40pub type CLKPLL_SDMIN_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, CLKPLL_SDM_SPEC, u32, u32, 24, O>;
42#[doc = "Field `clkpll_dither_sel` reader - "]
43pub type CLKPLL_DITHER_SEL_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `clkpll_dither_sel` writer - "]
45pub type CLKPLL_DITHER_SEL_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, CLKPLL_SDM_SPEC, u8, u8, 2, O>;
47#[doc = "Field `clkpll_sdm_flag` reader - "]
48pub type CLKPLL_SDM_FLAG_R = crate::BitReader<bool>;
49#[doc = "Field `clkpll_sdm_flag` writer - "]
50pub type CLKPLL_SDM_FLAG_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_SDM_SPEC, bool, O>;
51#[doc = "Field `clkpll_sdm_bypass` reader - "]
52pub type CLKPLL_SDM_BYPASS_R = crate::BitReader<bool>;
53#[doc = "Field `clkpll_sdm_bypass` writer - "]
54pub type CLKPLL_SDM_BYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLKPLL_SDM_SPEC, bool, O>;
55impl R {
56    #[doc = "Bits 0:23"]
57    #[inline(always)]
58    pub fn clkpll_sdmin(&self) -> CLKPLL_SDMIN_R {
59        CLKPLL_SDMIN_R::new(self.bits & 0x00ff_ffff)
60    }
61    #[doc = "Bits 24:25"]
62    #[inline(always)]
63    pub fn clkpll_dither_sel(&self) -> CLKPLL_DITHER_SEL_R {
64        CLKPLL_DITHER_SEL_R::new(((self.bits >> 24) & 3) as u8)
65    }
66    #[doc = "Bit 28"]
67    #[inline(always)]
68    pub fn clkpll_sdm_flag(&self) -> CLKPLL_SDM_FLAG_R {
69        CLKPLL_SDM_FLAG_R::new(((self.bits >> 28) & 1) != 0)
70    }
71    #[doc = "Bit 29"]
72    #[inline(always)]
73    pub fn clkpll_sdm_bypass(&self) -> CLKPLL_SDM_BYPASS_R {
74        CLKPLL_SDM_BYPASS_R::new(((self.bits >> 29) & 1) != 0)
75    }
76}
77impl W {
78    #[doc = "Bits 0:23"]
79    #[inline(always)]
80    #[must_use]
81    pub fn clkpll_sdmin(&mut self) -> CLKPLL_SDMIN_W<0> {
82        CLKPLL_SDMIN_W::new(self)
83    }
84    #[doc = "Bits 24:25"]
85    #[inline(always)]
86    #[must_use]
87    pub fn clkpll_dither_sel(&mut self) -> CLKPLL_DITHER_SEL_W<24> {
88        CLKPLL_DITHER_SEL_W::new(self)
89    }
90    #[doc = "Bit 28"]
91    #[inline(always)]
92    #[must_use]
93    pub fn clkpll_sdm_flag(&mut self) -> CLKPLL_SDM_FLAG_W<28> {
94        CLKPLL_SDM_FLAG_W::new(self)
95    }
96    #[doc = "Bit 29"]
97    #[inline(always)]
98    #[must_use]
99    pub fn clkpll_sdm_bypass(&mut self) -> CLKPLL_SDM_BYPASS_W<29> {
100        CLKPLL_SDM_BYPASS_W::new(self)
101    }
102    #[doc = "Writes raw bits to the register."]
103    #[inline(always)]
104    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
105        self.0.bits(bits);
106        self
107    }
108}
109#[doc = "clkpll_sdm.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [clkpll_sdm](index.html) module"]
110pub struct CLKPLL_SDM_SPEC;
111impl crate::RegisterSpec for CLKPLL_SDM_SPEC {
112    type Ux = u32;
113}
114#[doc = "`read()` method returns [clkpll_sdm::R](R) reader structure"]
115impl crate::Readable for CLKPLL_SDM_SPEC {
116    type Reader = R;
117}
118#[doc = "`write(|w| ..)` method takes [clkpll_sdm::W](W) writer structure"]
119impl crate::Writable for CLKPLL_SDM_SPEC {
120    type Writer = W;
121    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
122    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
123}
124#[doc = "`reset()` method sets clkpll_sdm to value 0"]
125impl crate::Resettable for CLKPLL_SDM_SPEC {
126    const RESET_VALUE: Self::Ux = 0;
127}