bl702_pac/rf/
lotpm.rs

1#[doc = "Register `lotpm` reader"]
2pub struct R(crate::R<LOTPM_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<LOTPM_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<LOTPM_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<LOTPM_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `lotpm` writer"]
17pub struct W(crate::W<LOTPM_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<LOTPM_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<LOTPM_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<LOTPM_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `lotpm_lfp_delay_sel` reader - "]
38pub type LOTPM_LFP_DELAY_SEL_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `lotpm_lfp_delay_sel` writer - "]
40pub type LOTPM_LFP_DELAY_SEL_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, LOTPM_SPEC, u8, u8, 2, O>;
42#[doc = "Field `lotpm_hfp_delay_fmash` reader - "]
43pub type LOTPM_HFP_DELAY_FMASH_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `lotpm_hfp_delay_fmash` writer - "]
45pub type LOTPM_HFP_DELAY_FMASH_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, LOTPM_SPEC, u8, u8, 4, O>;
47#[doc = "Field `lotpm_hfp_delay_fref` reader - "]
48pub type LOTPM_HFP_DELAY_FREF_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `lotpm_hfp_delay_fref` writer - "]
50pub type LOTPM_HFP_DELAY_FREF_W<'a, const O: u8> =
51    crate::FieldWriter<'a, u32, LOTPM_SPEC, u8, u8, 2, O>;
52#[doc = "Field `lotpm_hfp_polarity` reader - "]
53pub type LOTPM_HFP_POLARITY_R = crate::BitReader<bool>;
54#[doc = "Field `lotpm_hfp_polarity` writer - "]
55pub type LOTPM_HFP_POLARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, LOTPM_SPEC, bool, O>;
56#[doc = "Field `lotpm_hfp_mash1_sel` reader - "]
57pub type LOTPM_HFP_MASH1_SEL_R = crate::BitReader<bool>;
58#[doc = "Field `lotpm_hfp_mash1_sel` writer - "]
59pub type LOTPM_HFP_MASH1_SEL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LOTPM_SPEC, bool, O>;
60impl R {
61    #[doc = "Bits 0:1"]
62    #[inline(always)]
63    pub fn lotpm_lfp_delay_sel(&self) -> LOTPM_LFP_DELAY_SEL_R {
64        LOTPM_LFP_DELAY_SEL_R::new((self.bits & 3) as u8)
65    }
66    #[doc = "Bits 4:7"]
67    #[inline(always)]
68    pub fn lotpm_hfp_delay_fmash(&self) -> LOTPM_HFP_DELAY_FMASH_R {
69        LOTPM_HFP_DELAY_FMASH_R::new(((self.bits >> 4) & 0x0f) as u8)
70    }
71    #[doc = "Bits 8:9"]
72    #[inline(always)]
73    pub fn lotpm_hfp_delay_fref(&self) -> LOTPM_HFP_DELAY_FREF_R {
74        LOTPM_HFP_DELAY_FREF_R::new(((self.bits >> 8) & 3) as u8)
75    }
76    #[doc = "Bit 12"]
77    #[inline(always)]
78    pub fn lotpm_hfp_polarity(&self) -> LOTPM_HFP_POLARITY_R {
79        LOTPM_HFP_POLARITY_R::new(((self.bits >> 12) & 1) != 0)
80    }
81    #[doc = "Bit 16"]
82    #[inline(always)]
83    pub fn lotpm_hfp_mash1_sel(&self) -> LOTPM_HFP_MASH1_SEL_R {
84        LOTPM_HFP_MASH1_SEL_R::new(((self.bits >> 16) & 1) != 0)
85    }
86}
87impl W {
88    #[doc = "Bits 0:1"]
89    #[inline(always)]
90    #[must_use]
91    pub fn lotpm_lfp_delay_sel(&mut self) -> LOTPM_LFP_DELAY_SEL_W<0> {
92        LOTPM_LFP_DELAY_SEL_W::new(self)
93    }
94    #[doc = "Bits 4:7"]
95    #[inline(always)]
96    #[must_use]
97    pub fn lotpm_hfp_delay_fmash(&mut self) -> LOTPM_HFP_DELAY_FMASH_W<4> {
98        LOTPM_HFP_DELAY_FMASH_W::new(self)
99    }
100    #[doc = "Bits 8:9"]
101    #[inline(always)]
102    #[must_use]
103    pub fn lotpm_hfp_delay_fref(&mut self) -> LOTPM_HFP_DELAY_FREF_W<8> {
104        LOTPM_HFP_DELAY_FREF_W::new(self)
105    }
106    #[doc = "Bit 12"]
107    #[inline(always)]
108    #[must_use]
109    pub fn lotpm_hfp_polarity(&mut self) -> LOTPM_HFP_POLARITY_W<12> {
110        LOTPM_HFP_POLARITY_W::new(self)
111    }
112    #[doc = "Bit 16"]
113    #[inline(always)]
114    #[must_use]
115    pub fn lotpm_hfp_mash1_sel(&mut self) -> LOTPM_HFP_MASH1_SEL_W<16> {
116        LOTPM_HFP_MASH1_SEL_W::new(self)
117    }
118    #[doc = "Writes raw bits to the register."]
119    #[inline(always)]
120    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
121        self.0.bits(bits);
122        self
123    }
124}
125#[doc = "lotpm.\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 [lotpm](index.html) module"]
126pub struct LOTPM_SPEC;
127impl crate::RegisterSpec for LOTPM_SPEC {
128    type Ux = u32;
129}
130#[doc = "`read()` method returns [lotpm::R](R) reader structure"]
131impl crate::Readable for LOTPM_SPEC {
132    type Reader = R;
133}
134#[doc = "`write(|w| ..)` method takes [lotpm::W](W) writer structure"]
135impl crate::Writable for LOTPM_SPEC {
136    type Writer = W;
137    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
138    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
139}
140#[doc = "`reset()` method sets lotpm to value 0"]
141impl crate::Resettable for LOTPM_SPEC {
142    const RESET_VALUE: Self::Ux = 0;
143}