bl702_pac/rf/
adpll_slope_gen.rs

1#[doc = "Register `adpll_slope_gen` reader"]
2pub struct R(crate::R<ADPLL_SLOPE_GEN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<ADPLL_SLOPE_GEN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<ADPLL_SLOPE_GEN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<ADPLL_SLOPE_GEN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `adpll_slope_gen` writer"]
17pub struct W(crate::W<ADPLL_SLOPE_GEN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<ADPLL_SLOPE_GEN_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<ADPLL_SLOPE_GEN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<ADPLL_SLOPE_GEN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `adpll_slope_gen_r_sel` reader - "]
38pub type ADPLL_SLOPE_GEN_R_SEL_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `adpll_slope_gen_r_sel` writer - "]
40pub type ADPLL_SLOPE_GEN_R_SEL_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, ADPLL_SLOPE_GEN_SPEC, u8, u8, 3, O>;
42#[doc = "Field `adpll_slope_gen_dc_corr` reader - "]
43pub type ADPLL_SLOPE_GEN_DC_CORR_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `adpll_slope_gen_dc_corr` writer - "]
45pub type ADPLL_SLOPE_GEN_DC_CORR_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, ADPLL_SLOPE_GEN_SPEC, u8, u8, 2, O>;
47#[doc = "Field `adpll_slope_gen_pulse_width_enhance` reader - "]
48pub type ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_R = crate::BitReader<bool>;
49#[doc = "Field `adpll_slope_gen_pulse_width_enhance` writer - "]
50pub type ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, ADPLL_SLOPE_GEN_SPEC, bool, O>;
52impl R {
53    #[doc = "Bits 0:2"]
54    #[inline(always)]
55    pub fn adpll_slope_gen_r_sel(&self) -> ADPLL_SLOPE_GEN_R_SEL_R {
56        ADPLL_SLOPE_GEN_R_SEL_R::new((self.bits & 7) as u8)
57    }
58    #[doc = "Bits 4:5"]
59    #[inline(always)]
60    pub fn adpll_slope_gen_dc_corr(&self) -> ADPLL_SLOPE_GEN_DC_CORR_R {
61        ADPLL_SLOPE_GEN_DC_CORR_R::new(((self.bits >> 4) & 3) as u8)
62    }
63    #[doc = "Bit 6"]
64    #[inline(always)]
65    pub fn adpll_slope_gen_pulse_width_enhance(&self) -> ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_R {
66        ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_R::new(((self.bits >> 6) & 1) != 0)
67    }
68}
69impl W {
70    #[doc = "Bits 0:2"]
71    #[inline(always)]
72    #[must_use]
73    pub fn adpll_slope_gen_r_sel(&mut self) -> ADPLL_SLOPE_GEN_R_SEL_W<0> {
74        ADPLL_SLOPE_GEN_R_SEL_W::new(self)
75    }
76    #[doc = "Bits 4:5"]
77    #[inline(always)]
78    #[must_use]
79    pub fn adpll_slope_gen_dc_corr(&mut self) -> ADPLL_SLOPE_GEN_DC_CORR_W<4> {
80        ADPLL_SLOPE_GEN_DC_CORR_W::new(self)
81    }
82    #[doc = "Bit 6"]
83    #[inline(always)]
84    #[must_use]
85    pub fn adpll_slope_gen_pulse_width_enhance(
86        &mut self,
87    ) -> ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_W<6> {
88        ADPLL_SLOPE_GEN_PULSE_WIDTH_ENHANCE_W::new(self)
89    }
90    #[doc = "Writes raw bits to the register."]
91    #[inline(always)]
92    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
93        self.0.bits(bits);
94        self
95    }
96}
97#[doc = "adpll_slope_gen.\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 [adpll_slope_gen](index.html) module"]
98pub struct ADPLL_SLOPE_GEN_SPEC;
99impl crate::RegisterSpec for ADPLL_SLOPE_GEN_SPEC {
100    type Ux = u32;
101}
102#[doc = "`read()` method returns [adpll_slope_gen::R](R) reader structure"]
103impl crate::Readable for ADPLL_SLOPE_GEN_SPEC {
104    type Reader = R;
105}
106#[doc = "`write(|w| ..)` method takes [adpll_slope_gen::W](W) writer structure"]
107impl crate::Writable for ADPLL_SLOPE_GEN_SPEC {
108    type Writer = W;
109    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
110    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
111}
112#[doc = "`reset()` method sets adpll_slope_gen to value 0"]
113impl crate::Resettable for ADPLL_SLOPE_GEN_SPEC {
114    const RESET_VALUE: Self::Ux = 0;
115}