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