1#[doc = "Register `rbb` reader"]
2pub struct R(crate::R<RBB_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RBB_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RBB_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RBB_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `rbb` writer"]
17pub struct W(crate::W<RBB_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<RBB_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<RBB_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<RBB_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `pkdet_out_latch` reader - "]
38pub type PKDET_OUT_LATCH_R = crate::BitReader<bool>;
39#[doc = "Field `pkdet_out_latch` writer - "]
40pub type PKDET_OUT_LATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
41#[doc = "Field `pkdet_out_raw` reader - "]
42pub type PKDET_OUT_RAW_R = crate::BitReader<bool>;
43#[doc = "Field `pkdet_out_raw` writer - "]
44pub type PKDET_OUT_RAW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
45#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` reader - "]
46pub type RBB_PKDET_OUT_RSTN_CTRL_HW_R = crate::BitReader<bool>;
47#[doc = "Field `rbb_pkdet_out_rstn_ctrl_hw` writer - "]
48pub type RBB_PKDET_OUT_RSTN_CTRL_HW_W<'a, const O: u8> =
49 crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
50#[doc = "Field `rbb_pkdet_out_rstn_hw` reader - "]
51pub type RBB_PKDET_OUT_RSTN_HW_R = crate::BitReader<bool>;
52#[doc = "Field `rbb_pkdet_out_rstn_hw` writer - "]
53pub type RBB_PKDET_OUT_RSTN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
54#[doc = "Field `rbb_pkdet_out_rstn` reader - "]
55pub type RBB_PKDET_OUT_RSTN_R = crate::BitReader<bool>;
56#[doc = "Field `rbb_pkdet_out_rstn` writer - "]
57pub type RBB_PKDET_OUT_RSTN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
58#[doc = "Field `rbb_pkdet_en_ctrl_hw` reader - "]
59pub type RBB_PKDET_EN_CTRL_HW_R = crate::BitReader<bool>;
60#[doc = "Field `rbb_pkdet_en_ctrl_hw` writer - "]
61pub type RBB_PKDET_EN_CTRL_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
62#[doc = "Field `rbb_pkdet_en_hw` reader - "]
63pub type RBB_PKDET_EN_HW_R = crate::BitReader<bool>;
64#[doc = "Field `rbb_pkdet_en_hw` writer - "]
65pub type RBB_PKDET_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
66#[doc = "Field `rbb_pkdet_en` reader - "]
67pub type RBB_PKDET_EN_R = crate::BitReader<bool>;
68#[doc = "Field `rbb_pkdet_en` writer - "]
69pub type RBB_PKDET_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
70#[doc = "Field `rbb_pkdet_vth` reader - "]
71pub type RBB_PKDET_VTH_R = crate::FieldReader<u8, u8>;
72#[doc = "Field `rbb_pkdet_vth` writer - "]
73pub type RBB_PKDET_VTH_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB_SPEC, u8, u8, 4, O>;
74#[doc = "Field `rosdac_range` reader - "]
75pub type ROSDAC_RANGE_R = crate::FieldReader<u8, u8>;
76#[doc = "Field `rosdac_range` writer - "]
77pub type ROSDAC_RANGE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB_SPEC, u8, u8, 2, O>;
78#[doc = "Field `rbb_lpf_en` reader - "]
79pub type RBB_LPF_EN_R = crate::BitReader<bool>;
80#[doc = "Field `rbb_lpf_en` writer - "]
81pub type RBB_LPF_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RBB_SPEC, bool, O>;
82#[doc = "Field `rbb_deq` reader - "]
83pub type RBB_DEQ_R = crate::FieldReader<u8, u8>;
84#[doc = "Field `rbb_deq` writer - "]
85pub type RBB_DEQ_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB_SPEC, u8, u8, 2, O>;
86#[doc = "Field `rbb_vcm` reader - "]
87pub type RBB_VCM_R = crate::FieldReader<u8, u8>;
88#[doc = "Field `rbb_vcm` writer - "]
89pub type RBB_VCM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB_SPEC, u8, u8, 2, O>;
90#[doc = "Field `rbb_bm_op` reader - "]
91pub type RBB_BM_OP_R = crate::FieldReader<u8, u8>;
92#[doc = "Field `rbb_bm_op` writer - "]
93pub type RBB_BM_OP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBB_SPEC, u8, u8, 2, O>;
94impl R {
95 #[doc = "Bit 0"]
96 #[inline(always)]
97 pub fn pkdet_out_latch(&self) -> PKDET_OUT_LATCH_R {
98 PKDET_OUT_LATCH_R::new((self.bits & 1) != 0)
99 }
100 #[doc = "Bit 1"]
101 #[inline(always)]
102 pub fn pkdet_out_raw(&self) -> PKDET_OUT_RAW_R {
103 PKDET_OUT_RAW_R::new(((self.bits >> 1) & 1) != 0)
104 }
105 #[doc = "Bit 4"]
106 #[inline(always)]
107 pub fn rbb_pkdet_out_rstn_ctrl_hw(&self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_R {
108 RBB_PKDET_OUT_RSTN_CTRL_HW_R::new(((self.bits >> 4) & 1) != 0)
109 }
110 #[doc = "Bit 5"]
111 #[inline(always)]
112 pub fn rbb_pkdet_out_rstn_hw(&self) -> RBB_PKDET_OUT_RSTN_HW_R {
113 RBB_PKDET_OUT_RSTN_HW_R::new(((self.bits >> 5) & 1) != 0)
114 }
115 #[doc = "Bit 6"]
116 #[inline(always)]
117 pub fn rbb_pkdet_out_rstn(&self) -> RBB_PKDET_OUT_RSTN_R {
118 RBB_PKDET_OUT_RSTN_R::new(((self.bits >> 6) & 1) != 0)
119 }
120 #[doc = "Bit 8"]
121 #[inline(always)]
122 pub fn rbb_pkdet_en_ctrl_hw(&self) -> RBB_PKDET_EN_CTRL_HW_R {
123 RBB_PKDET_EN_CTRL_HW_R::new(((self.bits >> 8) & 1) != 0)
124 }
125 #[doc = "Bit 9"]
126 #[inline(always)]
127 pub fn rbb_pkdet_en_hw(&self) -> RBB_PKDET_EN_HW_R {
128 RBB_PKDET_EN_HW_R::new(((self.bits >> 9) & 1) != 0)
129 }
130 #[doc = "Bit 10"]
131 #[inline(always)]
132 pub fn rbb_pkdet_en(&self) -> RBB_PKDET_EN_R {
133 RBB_PKDET_EN_R::new(((self.bits >> 10) & 1) != 0)
134 }
135 #[doc = "Bits 12:15"]
136 #[inline(always)]
137 pub fn rbb_pkdet_vth(&self) -> RBB_PKDET_VTH_R {
138 RBB_PKDET_VTH_R::new(((self.bits >> 12) & 0x0f) as u8)
139 }
140 #[doc = "Bits 16:17"]
141 #[inline(always)]
142 pub fn rosdac_range(&self) -> ROSDAC_RANGE_R {
143 ROSDAC_RANGE_R::new(((self.bits >> 16) & 3) as u8)
144 }
145 #[doc = "Bit 19"]
146 #[inline(always)]
147 pub fn rbb_lpf_en(&self) -> RBB_LPF_EN_R {
148 RBB_LPF_EN_R::new(((self.bits >> 19) & 1) != 0)
149 }
150 #[doc = "Bits 20:21"]
151 #[inline(always)]
152 pub fn rbb_deq(&self) -> RBB_DEQ_R {
153 RBB_DEQ_R::new(((self.bits >> 20) & 3) as u8)
154 }
155 #[doc = "Bits 24:25"]
156 #[inline(always)]
157 pub fn rbb_vcm(&self) -> RBB_VCM_R {
158 RBB_VCM_R::new(((self.bits >> 24) & 3) as u8)
159 }
160 #[doc = "Bits 28:29"]
161 #[inline(always)]
162 pub fn rbb_bm_op(&self) -> RBB_BM_OP_R {
163 RBB_BM_OP_R::new(((self.bits >> 28) & 3) as u8)
164 }
165}
166impl W {
167 #[doc = "Bit 0"]
168 #[inline(always)]
169 #[must_use]
170 pub fn pkdet_out_latch(&mut self) -> PKDET_OUT_LATCH_W<0> {
171 PKDET_OUT_LATCH_W::new(self)
172 }
173 #[doc = "Bit 1"]
174 #[inline(always)]
175 #[must_use]
176 pub fn pkdet_out_raw(&mut self) -> PKDET_OUT_RAW_W<1> {
177 PKDET_OUT_RAW_W::new(self)
178 }
179 #[doc = "Bit 4"]
180 #[inline(always)]
181 #[must_use]
182 pub fn rbb_pkdet_out_rstn_ctrl_hw(&mut self) -> RBB_PKDET_OUT_RSTN_CTRL_HW_W<4> {
183 RBB_PKDET_OUT_RSTN_CTRL_HW_W::new(self)
184 }
185 #[doc = "Bit 5"]
186 #[inline(always)]
187 #[must_use]
188 pub fn rbb_pkdet_out_rstn_hw(&mut self) -> RBB_PKDET_OUT_RSTN_HW_W<5> {
189 RBB_PKDET_OUT_RSTN_HW_W::new(self)
190 }
191 #[doc = "Bit 6"]
192 #[inline(always)]
193 #[must_use]
194 pub fn rbb_pkdet_out_rstn(&mut self) -> RBB_PKDET_OUT_RSTN_W<6> {
195 RBB_PKDET_OUT_RSTN_W::new(self)
196 }
197 #[doc = "Bit 8"]
198 #[inline(always)]
199 #[must_use]
200 pub fn rbb_pkdet_en_ctrl_hw(&mut self) -> RBB_PKDET_EN_CTRL_HW_W<8> {
201 RBB_PKDET_EN_CTRL_HW_W::new(self)
202 }
203 #[doc = "Bit 9"]
204 #[inline(always)]
205 #[must_use]
206 pub fn rbb_pkdet_en_hw(&mut self) -> RBB_PKDET_EN_HW_W<9> {
207 RBB_PKDET_EN_HW_W::new(self)
208 }
209 #[doc = "Bit 10"]
210 #[inline(always)]
211 #[must_use]
212 pub fn rbb_pkdet_en(&mut self) -> RBB_PKDET_EN_W<10> {
213 RBB_PKDET_EN_W::new(self)
214 }
215 #[doc = "Bits 12:15"]
216 #[inline(always)]
217 #[must_use]
218 pub fn rbb_pkdet_vth(&mut self) -> RBB_PKDET_VTH_W<12> {
219 RBB_PKDET_VTH_W::new(self)
220 }
221 #[doc = "Bits 16:17"]
222 #[inline(always)]
223 #[must_use]
224 pub fn rosdac_range(&mut self) -> ROSDAC_RANGE_W<16> {
225 ROSDAC_RANGE_W::new(self)
226 }
227 #[doc = "Bit 19"]
228 #[inline(always)]
229 #[must_use]
230 pub fn rbb_lpf_en(&mut self) -> RBB_LPF_EN_W<19> {
231 RBB_LPF_EN_W::new(self)
232 }
233 #[doc = "Bits 20:21"]
234 #[inline(always)]
235 #[must_use]
236 pub fn rbb_deq(&mut self) -> RBB_DEQ_W<20> {
237 RBB_DEQ_W::new(self)
238 }
239 #[doc = "Bits 24:25"]
240 #[inline(always)]
241 #[must_use]
242 pub fn rbb_vcm(&mut self) -> RBB_VCM_W<24> {
243 RBB_VCM_W::new(self)
244 }
245 #[doc = "Bits 28:29"]
246 #[inline(always)]
247 #[must_use]
248 pub fn rbb_bm_op(&mut self) -> RBB_BM_OP_W<28> {
249 RBB_BM_OP_W::new(self)
250 }
251 #[doc = "Writes raw bits to the register."]
252 #[inline(always)]
253 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
254 self.0.bits(bits);
255 self
256 }
257}
258#[doc = "rbb.\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 [rbb](index.html) module"]
259pub struct RBB_SPEC;
260impl crate::RegisterSpec for RBB_SPEC {
261 type Ux = u32;
262}
263#[doc = "`read()` method returns [rbb::R](R) reader structure"]
264impl crate::Readable for RBB_SPEC {
265 type Reader = R;
266}
267#[doc = "`write(|w| ..)` method takes [rbb::W](W) writer structure"]
268impl crate::Writable for RBB_SPEC {
269 type Writer = W;
270 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
271 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
272}
273#[doc = "`reset()` method sets rbb to value 0"]
274impl crate::Resettable for RBB_SPEC {
275 const RESET_VALUE: Self::Ux = 0;
276}