bl702_pac/rf/
rf_cal_switch_ctrl.rs1#[doc = "Register `rf_cal_switch_ctrl` reader"]
2pub struct R(crate::R<RF_CAL_SWITCH_CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RF_CAL_SWITCH_CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RF_CAL_SWITCH_CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RF_CAL_SWITCH_CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `rf_cal_switch_ctrl` writer"]
17pub struct W(crate::W<RF_CAL_SWITCH_CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<RF_CAL_SWITCH_CTRL_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_CAL_SWITCH_CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<RF_CAL_SWITCH_CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `acal_en` reader - "]
38pub type ACAL_EN_R = crate::BitReader<bool>;
39#[doc = "Field `acal_en` writer - "]
40pub type ACAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
41#[doc = "Field `kcal_en` reader - "]
42pub type KCAL_EN_R = crate::BitReader<bool>;
43#[doc = "Field `kcal_en` writer - "]
44pub type KCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
45#[doc = "Field `rccal_en` reader - "]
46pub type RCCAL_EN_R = crate::BitReader<bool>;
47#[doc = "Field `rccal_en` writer - "]
48pub type RCCAL_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
49#[doc = "Field `inc_acal_en` reader - "]
50pub type INC_ACAL_EN_R = crate::BitReader<bool>;
51#[doc = "Field `inc_acal_en` writer - "]
52pub type INC_ACAL_EN_W<'a, const O: u8> =
53 crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
54#[doc = "Field `inc_fcal_en` reader - "]
55pub type INC_FCAL_EN_R = crate::BitReader<bool>;
56#[doc = "Field `inc_fcal_en` writer - "]
57pub type INC_FCAL_EN_W<'a, const O: u8> =
58 crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
59#[doc = "Field `inc_fcal_en_hw` reader - "]
60pub type INC_FCAL_EN_HW_R = crate::BitReader<bool>;
61#[doc = "Field `inc_fcal_en_hw` writer - "]
62pub type INC_FCAL_EN_HW_W<'a, const O: u8> =
63 crate::BitWriter<'a, u32, RF_CAL_SWITCH_CTRL_SPEC, bool, O>;
64impl R {
65 #[doc = "Bit 0"]
66 #[inline(always)]
67 pub fn acal_en(&self) -> ACAL_EN_R {
68 ACAL_EN_R::new((self.bits & 1) != 0)
69 }
70 #[doc = "Bit 4"]
71 #[inline(always)]
72 pub fn kcal_en(&self) -> KCAL_EN_R {
73 KCAL_EN_R::new(((self.bits >> 4) & 1) != 0)
74 }
75 #[doc = "Bit 8"]
76 #[inline(always)]
77 pub fn rccal_en(&self) -> RCCAL_EN_R {
78 RCCAL_EN_R::new(((self.bits >> 8) & 1) != 0)
79 }
80 #[doc = "Bit 12"]
81 #[inline(always)]
82 pub fn inc_acal_en(&self) -> INC_ACAL_EN_R {
83 INC_ACAL_EN_R::new(((self.bits >> 12) & 1) != 0)
84 }
85 #[doc = "Bit 16"]
86 #[inline(always)]
87 pub fn inc_fcal_en(&self) -> INC_FCAL_EN_R {
88 INC_FCAL_EN_R::new(((self.bits >> 16) & 1) != 0)
89 }
90 #[doc = "Bit 17"]
91 #[inline(always)]
92 pub fn inc_fcal_en_hw(&self) -> INC_FCAL_EN_HW_R {
93 INC_FCAL_EN_HW_R::new(((self.bits >> 17) & 1) != 0)
94 }
95}
96impl W {
97 #[doc = "Bit 0"]
98 #[inline(always)]
99 #[must_use]
100 pub fn acal_en(&mut self) -> ACAL_EN_W<0> {
101 ACAL_EN_W::new(self)
102 }
103 #[doc = "Bit 4"]
104 #[inline(always)]
105 #[must_use]
106 pub fn kcal_en(&mut self) -> KCAL_EN_W<4> {
107 KCAL_EN_W::new(self)
108 }
109 #[doc = "Bit 8"]
110 #[inline(always)]
111 #[must_use]
112 pub fn rccal_en(&mut self) -> RCCAL_EN_W<8> {
113 RCCAL_EN_W::new(self)
114 }
115 #[doc = "Bit 12"]
116 #[inline(always)]
117 #[must_use]
118 pub fn inc_acal_en(&mut self) -> INC_ACAL_EN_W<12> {
119 INC_ACAL_EN_W::new(self)
120 }
121 #[doc = "Bit 16"]
122 #[inline(always)]
123 #[must_use]
124 pub fn inc_fcal_en(&mut self) -> INC_FCAL_EN_W<16> {
125 INC_FCAL_EN_W::new(self)
126 }
127 #[doc = "Bit 17"]
128 #[inline(always)]
129 #[must_use]
130 pub fn inc_fcal_en_hw(&mut self) -> INC_FCAL_EN_HW_W<17> {
131 INC_FCAL_EN_HW_W::new(self)
132 }
133 #[doc = "Writes raw bits to the register."]
134 #[inline(always)]
135 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
136 self.0.bits(bits);
137 self
138 }
139}
140#[doc = "Calibration mode register\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_cal_switch_ctrl](index.html) module"]
141pub struct RF_CAL_SWITCH_CTRL_SPEC;
142impl crate::RegisterSpec for RF_CAL_SWITCH_CTRL_SPEC {
143 type Ux = u32;
144}
145#[doc = "`read()` method returns [rf_cal_switch_ctrl::R](R) reader structure"]
146impl crate::Readable for RF_CAL_SWITCH_CTRL_SPEC {
147 type Reader = R;
148}
149#[doc = "`write(|w| ..)` method takes [rf_cal_switch_ctrl::W](W) writer structure"]
150impl crate::Writable for RF_CAL_SWITCH_CTRL_SPEC {
151 type Writer = W;
152 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
153 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
154}
155#[doc = "`reset()` method sets rf_cal_switch_ctrl to value 0"]
156impl crate::Resettable for RF_CAL_SWITCH_CTRL_SPEC {
157 const RESET_VALUE: Self::Ux = 0;
158}