bl61x_pac/cci/
audio_pll_cfg4.rs

1#[doc = "Register `audio_pll_cfg4` reader"]
2pub type R = crate::R<AUDIO_PLL_CFG4_SPEC>;
3#[doc = "Register `audio_pll_cfg4` writer"]
4pub type W = crate::W<AUDIO_PLL_CFG4_SPEC>;
5#[doc = "Field `aupll_sel_sample_clk` reader - "]
6pub type AUPLL_SEL_SAMPLE_CLK_R = crate::FieldReader;
7#[doc = "Field `aupll_sel_sample_clk` writer - "]
8pub type AUPLL_SEL_SAMPLE_CLK_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `aupll_sel_fb_clk` reader - "]
10pub type AUPLL_SEL_FB_CLK_R = crate::FieldReader;
11#[doc = "Field `aupll_sel_fb_clk` writer - "]
12pub type AUPLL_SEL_FB_CLK_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `aupll_sdmclk_sel` reader - "]
14pub type AUPLL_SDMCLK_SEL_R = crate::BitReader;
15#[doc = "Field `aupll_sdmclk_sel` writer - "]
16pub type AUPLL_SDMCLK_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18    #[doc = "Bits 0:1"]
19    #[inline(always)]
20    pub fn aupll_sel_sample_clk(&self) -> AUPLL_SEL_SAMPLE_CLK_R {
21        AUPLL_SEL_SAMPLE_CLK_R::new((self.bits & 3) as u8)
22    }
23    #[doc = "Bits 4:5"]
24    #[inline(always)]
25    pub fn aupll_sel_fb_clk(&self) -> AUPLL_SEL_FB_CLK_R {
26        AUPLL_SEL_FB_CLK_R::new(((self.bits >> 4) & 3) as u8)
27    }
28    #[doc = "Bit 8"]
29    #[inline(always)]
30    pub fn aupll_sdmclk_sel(&self) -> AUPLL_SDMCLK_SEL_R {
31        AUPLL_SDMCLK_SEL_R::new(((self.bits >> 8) & 1) != 0)
32    }
33}
34impl W {
35    #[doc = "Bits 0:1"]
36    #[inline(always)]
37    #[must_use]
38    pub fn aupll_sel_sample_clk(&mut self) -> AUPLL_SEL_SAMPLE_CLK_W<AUDIO_PLL_CFG4_SPEC> {
39        AUPLL_SEL_SAMPLE_CLK_W::new(self, 0)
40    }
41    #[doc = "Bits 4:5"]
42    #[inline(always)]
43    #[must_use]
44    pub fn aupll_sel_fb_clk(&mut self) -> AUPLL_SEL_FB_CLK_W<AUDIO_PLL_CFG4_SPEC> {
45        AUPLL_SEL_FB_CLK_W::new(self, 4)
46    }
47    #[doc = "Bit 8"]
48    #[inline(always)]
49    #[must_use]
50    pub fn aupll_sdmclk_sel(&mut self) -> AUPLL_SDMCLK_SEL_W<AUDIO_PLL_CFG4_SPEC> {
51        AUPLL_SDMCLK_SEL_W::new(self, 8)
52    }
53    #[doc = r" Writes raw bits to the register."]
54    #[doc = r""]
55    #[doc = r" # Safety"]
56    #[doc = r""]
57    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
58    #[inline(always)]
59    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
60        self.bits = bits;
61        self
62    }
63}
64#[doc = "audio_pll_cfg4.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`audio_pll_cfg4::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 [`audio_pll_cfg4::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
65pub struct AUDIO_PLL_CFG4_SPEC;
66impl crate::RegisterSpec for AUDIO_PLL_CFG4_SPEC {
67    type Ux = u32;
68}
69#[doc = "`read()` method returns [`audio_pll_cfg4::R`](R) reader structure"]
70impl crate::Readable for AUDIO_PLL_CFG4_SPEC {}
71#[doc = "`write(|w| ..)` method takes [`audio_pll_cfg4::W`](W) writer structure"]
72impl crate::Writable for AUDIO_PLL_CFG4_SPEC {
73    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
74    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
75}
76#[doc = "`reset()` method sets audio_pll_cfg4 to value 0"]
77impl crate::Resettable for AUDIO_PLL_CFG4_SPEC {
78    const RESET_VALUE: Self::Ux = 0;
79}