bl61x_pac/cci/
audio_pll_cfg10.rs

1#[doc = "Register `audio_pll_cfg10` reader"]
2pub type R = crate::R<AUDIO_PLL_CFG10_SPEC>;
3#[doc = "Register `audio_pll_cfg10` writer"]
4pub type W = crate::W<AUDIO_PLL_CFG10_SPEC>;
5#[doc = "Field `aupll_ssc_en` reader - "]
6pub type AUPLL_SSC_EN_R = crate::BitReader;
7#[doc = "Field `aupll_ssc_en` writer - "]
8pub type AUPLL_SSC_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `aupll_ssc_cnt` reader - "]
10pub type AUPLL_SSC_CNT_R = crate::FieldReader;
11#[doc = "Field `aupll_ssc_cnt` writer - "]
12pub type AUPLL_SSC_CNT_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `aupll_ssc_gain` reader - "]
14pub type AUPLL_SSC_GAIN_R = crate::FieldReader;
15#[doc = "Field `aupll_ssc_gain` writer - "]
16pub type AUPLL_SSC_GAIN_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17#[doc = "Field `aupll_ssc_start_gate_en` reader - "]
18pub type AUPLL_SSC_START_GATE_EN_R = crate::BitReader;
19#[doc = "Field `aupll_ssc_start_gate_en` writer - "]
20pub type AUPLL_SSC_START_GATE_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `aupll_ssc_start` reader - "]
22pub type AUPLL_SSC_START_R = crate::BitReader;
23#[doc = "Field `aupll_ssc_start` writer - "]
24pub type AUPLL_SSC_START_W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26    #[doc = "Bit 0"]
27    #[inline(always)]
28    pub fn aupll_ssc_en(&self) -> AUPLL_SSC_EN_R {
29        AUPLL_SSC_EN_R::new((self.bits & 1) != 0)
30    }
31    #[doc = "Bits 4:11"]
32    #[inline(always)]
33    pub fn aupll_ssc_cnt(&self) -> AUPLL_SSC_CNT_R {
34        AUPLL_SSC_CNT_R::new(((self.bits >> 4) & 0xff) as u8)
35    }
36    #[doc = "Bits 12:14"]
37    #[inline(always)]
38    pub fn aupll_ssc_gain(&self) -> AUPLL_SSC_GAIN_R {
39        AUPLL_SSC_GAIN_R::new(((self.bits >> 12) & 7) as u8)
40    }
41    #[doc = "Bit 16"]
42    #[inline(always)]
43    pub fn aupll_ssc_start_gate_en(&self) -> AUPLL_SSC_START_GATE_EN_R {
44        AUPLL_SSC_START_GATE_EN_R::new(((self.bits >> 16) & 1) != 0)
45    }
46    #[doc = "Bit 20"]
47    #[inline(always)]
48    pub fn aupll_ssc_start(&self) -> AUPLL_SSC_START_R {
49        AUPLL_SSC_START_R::new(((self.bits >> 20) & 1) != 0)
50    }
51}
52impl W {
53    #[doc = "Bit 0"]
54    #[inline(always)]
55    #[must_use]
56    pub fn aupll_ssc_en(&mut self) -> AUPLL_SSC_EN_W<AUDIO_PLL_CFG10_SPEC> {
57        AUPLL_SSC_EN_W::new(self, 0)
58    }
59    #[doc = "Bits 4:11"]
60    #[inline(always)]
61    #[must_use]
62    pub fn aupll_ssc_cnt(&mut self) -> AUPLL_SSC_CNT_W<AUDIO_PLL_CFG10_SPEC> {
63        AUPLL_SSC_CNT_W::new(self, 4)
64    }
65    #[doc = "Bits 12:14"]
66    #[inline(always)]
67    #[must_use]
68    pub fn aupll_ssc_gain(&mut self) -> AUPLL_SSC_GAIN_W<AUDIO_PLL_CFG10_SPEC> {
69        AUPLL_SSC_GAIN_W::new(self, 12)
70    }
71    #[doc = "Bit 16"]
72    #[inline(always)]
73    #[must_use]
74    pub fn aupll_ssc_start_gate_en(&mut self) -> AUPLL_SSC_START_GATE_EN_W<AUDIO_PLL_CFG10_SPEC> {
75        AUPLL_SSC_START_GATE_EN_W::new(self, 16)
76    }
77    #[doc = "Bit 20"]
78    #[inline(always)]
79    #[must_use]
80    pub fn aupll_ssc_start(&mut self) -> AUPLL_SSC_START_W<AUDIO_PLL_CFG10_SPEC> {
81        AUPLL_SSC_START_W::new(self, 20)
82    }
83    #[doc = r" Writes raw bits to the register."]
84    #[doc = r""]
85    #[doc = r" # Safety"]
86    #[doc = r""]
87    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
88    #[inline(always)]
89    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
90        self.bits = bits;
91        self
92    }
93}
94#[doc = "audio_pll_cfg10.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`audio_pll_cfg10::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_cfg10::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
95pub struct AUDIO_PLL_CFG10_SPEC;
96impl crate::RegisterSpec for AUDIO_PLL_CFG10_SPEC {
97    type Ux = u32;
98}
99#[doc = "`read()` method returns [`audio_pll_cfg10::R`](R) reader structure"]
100impl crate::Readable for AUDIO_PLL_CFG10_SPEC {}
101#[doc = "`write(|w| ..)` method takes [`audio_pll_cfg10::W`](W) writer structure"]
102impl crate::Writable for AUDIO_PLL_CFG10_SPEC {
103    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
104    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
105}
106#[doc = "`reset()` method sets audio_pll_cfg10 to value 0"]
107impl crate::Resettable for AUDIO_PLL_CFG10_SPEC {
108    const RESET_VALUE: Self::Ux = 0;
109}