bl602_pac/rf/
rfif_dig_ctrl.rs1#[doc = "Register `rfif_dig_ctrl` reader"]
2pub struct R(crate::R<RFIF_DIG_CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RFIF_DIG_CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RFIF_DIG_CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RFIF_DIG_CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `rfif_dig_ctrl` writer"]
17pub struct W(crate::W<RFIF_DIG_CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<RFIF_DIG_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<RFIF_DIG_CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<RFIF_DIG_CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `test_from_pad_en` reader - "]
38pub type TEST_FROM_PAD_EN_R = crate::BitReader<bool>;
39#[doc = "Field `test_from_pad_en` writer - "]
40pub type TEST_FROM_PAD_EN_W<'a, const O: u8> =
41 crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>;
42#[doc = "Field `test_gc_from_pad_en` reader - "]
43pub type TEST_GC_FROM_PAD_EN_R = crate::BitReader<bool>;
44#[doc = "Field `test_gc_from_pad_en` writer - "]
45pub type TEST_GC_FROM_PAD_EN_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>;
47#[doc = "Field `rfckg_rxclk_div2_mode` reader - "]
48pub type RFCKG_RXCLK_DIV2_MODE_R = crate::BitReader<bool>;
49#[doc = "Field `rfckg_rxclk_div2_mode` writer - "]
50pub type RFCKG_RXCLK_DIV2_MODE_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>;
52#[doc = "Field `rfif_int_lo_unlocked_mask` reader - "]
53pub type RFIF_INT_LO_UNLOCKED_MASK_R = crate::BitReader<bool>;
54#[doc = "Field `rfif_int_lo_unlocked_mask` writer - "]
55pub type RFIF_INT_LO_UNLOCKED_MASK_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>;
57#[doc = "Field `rfif_ppud_cnt2` reader - "]
58pub type RFIF_PPUD_CNT2_R = crate::FieldReader<u16, u16>;
59#[doc = "Field `rfif_ppud_cnt2` writer - "]
60pub type RFIF_PPUD_CNT2_W<'a, const O: u8> =
61 crate::FieldWriter<'a, u32, RFIF_DIG_CTRL_SPEC, u16, u16, 9, O>;
62#[doc = "Field `rfif_ppud_cnt1` reader - "]
63pub type RFIF_PPUD_CNT1_R = crate::FieldReader<u8, u8>;
64#[doc = "Field `rfif_ppud_cnt1` writer - "]
65pub type RFIF_PPUD_CNT1_W<'a, const O: u8> =
66 crate::FieldWriter<'a, u32, RFIF_DIG_CTRL_SPEC, u8, u8, 5, O>;
67#[doc = "Field `rfif_ppud_manaual_en` reader - "]
68pub type RFIF_PPUD_MANAUAL_EN_R = crate::BitReader<bool>;
69#[doc = "Field `rfif_ppud_manaual_en` writer - "]
70pub type RFIF_PPUD_MANAUAL_EN_W<'a, const O: u8> =
71 crate::BitWriter<'a, u32, RFIF_DIG_CTRL_SPEC, bool, O>;
72impl R {
73 #[doc = "Bit 0"]
74 #[inline(always)]
75 pub fn test_from_pad_en(&self) -> TEST_FROM_PAD_EN_R {
76 TEST_FROM_PAD_EN_R::new((self.bits & 1) != 0)
77 }
78 #[doc = "Bit 1"]
79 #[inline(always)]
80 pub fn test_gc_from_pad_en(&self) -> TEST_GC_FROM_PAD_EN_R {
81 TEST_GC_FROM_PAD_EN_R::new(((self.bits >> 1) & 1) != 0)
82 }
83 #[doc = "Bit 2"]
84 #[inline(always)]
85 pub fn rfckg_rxclk_div2_mode(&self) -> RFCKG_RXCLK_DIV2_MODE_R {
86 RFCKG_RXCLK_DIV2_MODE_R::new(((self.bits >> 2) & 1) != 0)
87 }
88 #[doc = "Bit 3"]
89 #[inline(always)]
90 pub fn rfif_int_lo_unlocked_mask(&self) -> RFIF_INT_LO_UNLOCKED_MASK_R {
91 RFIF_INT_LO_UNLOCKED_MASK_R::new(((self.bits >> 3) & 1) != 0)
92 }
93 #[doc = "Bits 16:24"]
94 #[inline(always)]
95 pub fn rfif_ppud_cnt2(&self) -> RFIF_PPUD_CNT2_R {
96 RFIF_PPUD_CNT2_R::new(((self.bits >> 16) & 0x01ff) as u16)
97 }
98 #[doc = "Bits 25:29"]
99 #[inline(always)]
100 pub fn rfif_ppud_cnt1(&self) -> RFIF_PPUD_CNT1_R {
101 RFIF_PPUD_CNT1_R::new(((self.bits >> 25) & 0x1f) as u8)
102 }
103 #[doc = "Bit 30"]
104 #[inline(always)]
105 pub fn rfif_ppud_manaual_en(&self) -> RFIF_PPUD_MANAUAL_EN_R {
106 RFIF_PPUD_MANAUAL_EN_R::new(((self.bits >> 30) & 1) != 0)
107 }
108}
109impl W {
110 #[doc = "Bit 0"]
111 #[inline(always)]
112 #[must_use]
113 pub fn test_from_pad_en(&mut self) -> TEST_FROM_PAD_EN_W<0> {
114 TEST_FROM_PAD_EN_W::new(self)
115 }
116 #[doc = "Bit 1"]
117 #[inline(always)]
118 #[must_use]
119 pub fn test_gc_from_pad_en(&mut self) -> TEST_GC_FROM_PAD_EN_W<1> {
120 TEST_GC_FROM_PAD_EN_W::new(self)
121 }
122 #[doc = "Bit 2"]
123 #[inline(always)]
124 #[must_use]
125 pub fn rfckg_rxclk_div2_mode(&mut self) -> RFCKG_RXCLK_DIV2_MODE_W<2> {
126 RFCKG_RXCLK_DIV2_MODE_W::new(self)
127 }
128 #[doc = "Bit 3"]
129 #[inline(always)]
130 #[must_use]
131 pub fn rfif_int_lo_unlocked_mask(&mut self) -> RFIF_INT_LO_UNLOCKED_MASK_W<3> {
132 RFIF_INT_LO_UNLOCKED_MASK_W::new(self)
133 }
134 #[doc = "Bits 16:24"]
135 #[inline(always)]
136 #[must_use]
137 pub fn rfif_ppud_cnt2(&mut self) -> RFIF_PPUD_CNT2_W<16> {
138 RFIF_PPUD_CNT2_W::new(self)
139 }
140 #[doc = "Bits 25:29"]
141 #[inline(always)]
142 #[must_use]
143 pub fn rfif_ppud_cnt1(&mut self) -> RFIF_PPUD_CNT1_W<25> {
144 RFIF_PPUD_CNT1_W::new(self)
145 }
146 #[doc = "Bit 30"]
147 #[inline(always)]
148 #[must_use]
149 pub fn rfif_ppud_manaual_en(&mut self) -> RFIF_PPUD_MANAUAL_EN_W<30> {
150 RFIF_PPUD_MANAUAL_EN_W::new(self)
151 }
152 #[doc = "Writes raw bits to the register."]
153 #[inline(always)]
154 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
155 self.0.bits(bits);
156 self
157 }
158}
159#[doc = "rfif_dig_ctrl.\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 [rfif_dig_ctrl](index.html) module"]
160pub struct RFIF_DIG_CTRL_SPEC;
161impl crate::RegisterSpec for RFIF_DIG_CTRL_SPEC {
162 type Ux = u32;
163}
164#[doc = "`read()` method returns [rfif_dig_ctrl::R](R) reader structure"]
165impl crate::Readable for RFIF_DIG_CTRL_SPEC {
166 type Reader = R;
167}
168#[doc = "`write(|w| ..)` method takes [rfif_dig_ctrl::W](W) writer structure"]
169impl crate::Writable for RFIF_DIG_CTRL_SPEC {
170 type Writer = W;
171 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
172 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
173}
174#[doc = "`reset()` method sets rfif_dig_ctrl to value 0"]
175impl crate::Resettable for RFIF_DIG_CTRL_SPEC {
176 const RESET_VALUE: Self::Ux = 0;
177}