bl702_pac/rf/
rf_singen_4.rs

1#[doc = "Register `rf_singen_4` reader"]
2pub struct R(crate::R<RF_SINGEN_4_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RF_SINGEN_4_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RF_SINGEN_4_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RF_SINGEN_4_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `rf_singen_4` writer"]
17pub struct W(crate::W<RF_SINGEN_4_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RF_SINGEN_4_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<RF_SINGEN_4_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RF_SINGEN_4_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `singen_fix_q` reader - "]
38pub type SINGEN_FIX_Q_R = crate::FieldReader<u16, u16>;
39#[doc = "Field `singen_fix_q` writer - "]
40pub type SINGEN_FIX_Q_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, RF_SINGEN_4_SPEC, u16, u16, 12, O>;
42#[doc = "Field `singen_fix_en_q` reader - "]
43pub type SINGEN_FIX_EN_Q_R = crate::BitReader<bool>;
44#[doc = "Field `singen_fix_en_q` writer - "]
45pub type SINGEN_FIX_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_SINGEN_4_SPEC, bool, O>;
46#[doc = "Field `singen_fix_i` reader - "]
47pub type SINGEN_FIX_I_R = crate::FieldReader<u16, u16>;
48#[doc = "Field `singen_fix_i` writer - "]
49pub type SINGEN_FIX_I_W<'a, const O: u8> =
50    crate::FieldWriter<'a, u32, RF_SINGEN_4_SPEC, u16, u16, 12, O>;
51#[doc = "Field `singen_fix_en_i` reader - "]
52pub type SINGEN_FIX_EN_I_R = crate::BitReader<bool>;
53#[doc = "Field `singen_fix_en_i` writer - "]
54pub type SINGEN_FIX_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_SINGEN_4_SPEC, bool, O>;
55impl R {
56    #[doc = "Bits 0:11"]
57    #[inline(always)]
58    pub fn singen_fix_q(&self) -> SINGEN_FIX_Q_R {
59        SINGEN_FIX_Q_R::new((self.bits & 0x0fff) as u16)
60    }
61    #[doc = "Bit 12"]
62    #[inline(always)]
63    pub fn singen_fix_en_q(&self) -> SINGEN_FIX_EN_Q_R {
64        SINGEN_FIX_EN_Q_R::new(((self.bits >> 12) & 1) != 0)
65    }
66    #[doc = "Bits 16:27"]
67    #[inline(always)]
68    pub fn singen_fix_i(&self) -> SINGEN_FIX_I_R {
69        SINGEN_FIX_I_R::new(((self.bits >> 16) & 0x0fff) as u16)
70    }
71    #[doc = "Bit 28"]
72    #[inline(always)]
73    pub fn singen_fix_en_i(&self) -> SINGEN_FIX_EN_I_R {
74        SINGEN_FIX_EN_I_R::new(((self.bits >> 28) & 1) != 0)
75    }
76}
77impl W {
78    #[doc = "Bits 0:11"]
79    #[inline(always)]
80    #[must_use]
81    pub fn singen_fix_q(&mut self) -> SINGEN_FIX_Q_W<0> {
82        SINGEN_FIX_Q_W::new(self)
83    }
84    #[doc = "Bit 12"]
85    #[inline(always)]
86    #[must_use]
87    pub fn singen_fix_en_q(&mut self) -> SINGEN_FIX_EN_Q_W<12> {
88        SINGEN_FIX_EN_Q_W::new(self)
89    }
90    #[doc = "Bits 16:27"]
91    #[inline(always)]
92    #[must_use]
93    pub fn singen_fix_i(&mut self) -> SINGEN_FIX_I_W<16> {
94        SINGEN_FIX_I_W::new(self)
95    }
96    #[doc = "Bit 28"]
97    #[inline(always)]
98    #[must_use]
99    pub fn singen_fix_en_i(&mut self) -> SINGEN_FIX_EN_I_W<28> {
100        SINGEN_FIX_EN_I_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 = "rf_singen_4.\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 [rf_singen_4](index.html) module"]
110pub struct RF_SINGEN_4_SPEC;
111impl crate::RegisterSpec for RF_SINGEN_4_SPEC {
112    type Ux = u32;
113}
114#[doc = "`read()` method returns [rf_singen_4::R](R) reader structure"]
115impl crate::Readable for RF_SINGEN_4_SPEC {
116    type Reader = R;
117}
118#[doc = "`write(|w| ..)` method takes [rf_singen_4::W](W) writer structure"]
119impl crate::Writable for RF_SINGEN_4_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 rf_singen_4 to value 0"]
125impl crate::Resettable for RF_SINGEN_4_SPEC {
126    const RESET_VALUE: Self::Ux = 0;
127}