1#[doc = "Register `ten_ac` reader"]
2pub struct R(crate::R<TEN_AC_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TEN_AC_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TEN_AC_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TEN_AC_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ten_ac` writer"]
17pub struct W(crate::W<TEN_AC_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TEN_AC_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<TEN_AC_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TEN_AC_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `atest_op_cc` reader - "]
38pub type ATEST_OP_CC_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `atest_op_cc` writer - "]
40pub type ATEST_OP_CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 4, O>;
41#[doc = "Field `atest_dac_en` reader - "]
42pub type ATEST_DAC_EN_R = crate::BitReader<bool>;
43#[doc = "Field `atest_dac_en` writer - "]
44pub type ATEST_DAC_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
45#[doc = "Field `atest_in_trx_sw` reader - "]
46pub type ATEST_IN_TRX_SW_R = crate::BitReader<bool>;
47#[doc = "Field `atest_in_trx_sw` writer - "]
48pub type ATEST_IN_TRX_SW_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
49#[doc = "Field `atest_in_en` reader - "]
50pub type ATEST_IN_EN_R = crate::BitReader<bool>;
51#[doc = "Field `atest_in_en` writer - "]
52pub type ATEST_IN_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
53#[doc = "Field `atest_gain_r9` reader - "]
54pub type ATEST_GAIN_R9_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `atest_gain_r9` writer - "]
56pub type ATEST_GAIN_R9_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>;
57#[doc = "Field `atest_gain_r8` reader - "]
58pub type ATEST_GAIN_R8_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `atest_gain_r8` writer - "]
60pub type ATEST_GAIN_R8_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>;
61#[doc = "Field `atest_gain_r7` reader - "]
62pub type ATEST_GAIN_R7_R = crate::FieldReader<u8, u8>;
63#[doc = "Field `atest_gain_r7` writer - "]
64pub type ATEST_GAIN_R7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>;
65#[doc = "Field `atest_gain_r6` reader - "]
66pub type ATEST_GAIN_R6_R = crate::FieldReader<u8, u8>;
67#[doc = "Field `atest_gain_r6` writer - "]
68pub type ATEST_GAIN_R6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 2, O>;
69#[doc = "Field `atest_gain_r5` reader - "]
70pub type ATEST_GAIN_R5_R = crate::FieldReader<u8, u8>;
71#[doc = "Field `atest_gain_r5` writer - "]
72pub type ATEST_GAIN_R5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TEN_AC_SPEC, u8, u8, 3, O>;
73#[doc = "Field `atest_out_en_q` reader - "]
74pub type ATEST_OUT_EN_Q_R = crate::BitReader<bool>;
75#[doc = "Field `atest_out_en_q` writer - "]
76pub type ATEST_OUT_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
77#[doc = "Field `atest_out_en_i` reader - "]
78pub type ATEST_OUT_EN_I_R = crate::BitReader<bool>;
79#[doc = "Field `atest_out_en_i` writer - "]
80pub type ATEST_OUT_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
81#[doc = "Field `atest_in_en_q` reader - "]
82pub type ATEST_IN_EN_Q_R = crate::BitReader<bool>;
83#[doc = "Field `atest_in_en_q` writer - "]
84pub type ATEST_IN_EN_Q_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
85#[doc = "Field `atest_in_en_i` reader - "]
86pub type ATEST_IN_EN_I_R = crate::BitReader<bool>;
87#[doc = "Field `atest_in_en_i` writer - "]
88pub type ATEST_IN_EN_I_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEN_AC_SPEC, bool, O>;
89impl R {
90 #[doc = "Bits 0:3"]
91 #[inline(always)]
92 pub fn atest_op_cc(&self) -> ATEST_OP_CC_R {
93 ATEST_OP_CC_R::new((self.bits & 0x0f) as u8)
94 }
95 #[doc = "Bit 4"]
96 #[inline(always)]
97 pub fn atest_dac_en(&self) -> ATEST_DAC_EN_R {
98 ATEST_DAC_EN_R::new(((self.bits >> 4) & 1) != 0)
99 }
100 #[doc = "Bit 5"]
101 #[inline(always)]
102 pub fn atest_in_trx_sw(&self) -> ATEST_IN_TRX_SW_R {
103 ATEST_IN_TRX_SW_R::new(((self.bits >> 5) & 1) != 0)
104 }
105 #[doc = "Bit 6"]
106 #[inline(always)]
107 pub fn atest_in_en(&self) -> ATEST_IN_EN_R {
108 ATEST_IN_EN_R::new(((self.bits >> 6) & 1) != 0)
109 }
110 #[doc = "Bits 8:9"]
111 #[inline(always)]
112 pub fn atest_gain_r9(&self) -> ATEST_GAIN_R9_R {
113 ATEST_GAIN_R9_R::new(((self.bits >> 8) & 3) as u8)
114 }
115 #[doc = "Bits 10:11"]
116 #[inline(always)]
117 pub fn atest_gain_r8(&self) -> ATEST_GAIN_R8_R {
118 ATEST_GAIN_R8_R::new(((self.bits >> 10) & 3) as u8)
119 }
120 #[doc = "Bits 12:13"]
121 #[inline(always)]
122 pub fn atest_gain_r7(&self) -> ATEST_GAIN_R7_R {
123 ATEST_GAIN_R7_R::new(((self.bits >> 12) & 3) as u8)
124 }
125 #[doc = "Bits 14:15"]
126 #[inline(always)]
127 pub fn atest_gain_r6(&self) -> ATEST_GAIN_R6_R {
128 ATEST_GAIN_R6_R::new(((self.bits >> 14) & 3) as u8)
129 }
130 #[doc = "Bits 16:18"]
131 #[inline(always)]
132 pub fn atest_gain_r5(&self) -> ATEST_GAIN_R5_R {
133 ATEST_GAIN_R5_R::new(((self.bits >> 16) & 7) as u8)
134 }
135 #[doc = "Bit 20"]
136 #[inline(always)]
137 pub fn atest_out_en_q(&self) -> ATEST_OUT_EN_Q_R {
138 ATEST_OUT_EN_Q_R::new(((self.bits >> 20) & 1) != 0)
139 }
140 #[doc = "Bit 21"]
141 #[inline(always)]
142 pub fn atest_out_en_i(&self) -> ATEST_OUT_EN_I_R {
143 ATEST_OUT_EN_I_R::new(((self.bits >> 21) & 1) != 0)
144 }
145 #[doc = "Bit 22"]
146 #[inline(always)]
147 pub fn atest_in_en_q(&self) -> ATEST_IN_EN_Q_R {
148 ATEST_IN_EN_Q_R::new(((self.bits >> 22) & 1) != 0)
149 }
150 #[doc = "Bit 23"]
151 #[inline(always)]
152 pub fn atest_in_en_i(&self) -> ATEST_IN_EN_I_R {
153 ATEST_IN_EN_I_R::new(((self.bits >> 23) & 1) != 0)
154 }
155}
156impl W {
157 #[doc = "Bits 0:3"]
158 #[inline(always)]
159 #[must_use]
160 pub fn atest_op_cc(&mut self) -> ATEST_OP_CC_W<0> {
161 ATEST_OP_CC_W::new(self)
162 }
163 #[doc = "Bit 4"]
164 #[inline(always)]
165 #[must_use]
166 pub fn atest_dac_en(&mut self) -> ATEST_DAC_EN_W<4> {
167 ATEST_DAC_EN_W::new(self)
168 }
169 #[doc = "Bit 5"]
170 #[inline(always)]
171 #[must_use]
172 pub fn atest_in_trx_sw(&mut self) -> ATEST_IN_TRX_SW_W<5> {
173 ATEST_IN_TRX_SW_W::new(self)
174 }
175 #[doc = "Bit 6"]
176 #[inline(always)]
177 #[must_use]
178 pub fn atest_in_en(&mut self) -> ATEST_IN_EN_W<6> {
179 ATEST_IN_EN_W::new(self)
180 }
181 #[doc = "Bits 8:9"]
182 #[inline(always)]
183 #[must_use]
184 pub fn atest_gain_r9(&mut self) -> ATEST_GAIN_R9_W<8> {
185 ATEST_GAIN_R9_W::new(self)
186 }
187 #[doc = "Bits 10:11"]
188 #[inline(always)]
189 #[must_use]
190 pub fn atest_gain_r8(&mut self) -> ATEST_GAIN_R8_W<10> {
191 ATEST_GAIN_R8_W::new(self)
192 }
193 #[doc = "Bits 12:13"]
194 #[inline(always)]
195 #[must_use]
196 pub fn atest_gain_r7(&mut self) -> ATEST_GAIN_R7_W<12> {
197 ATEST_GAIN_R7_W::new(self)
198 }
199 #[doc = "Bits 14:15"]
200 #[inline(always)]
201 #[must_use]
202 pub fn atest_gain_r6(&mut self) -> ATEST_GAIN_R6_W<14> {
203 ATEST_GAIN_R6_W::new(self)
204 }
205 #[doc = "Bits 16:18"]
206 #[inline(always)]
207 #[must_use]
208 pub fn atest_gain_r5(&mut self) -> ATEST_GAIN_R5_W<16> {
209 ATEST_GAIN_R5_W::new(self)
210 }
211 #[doc = "Bit 20"]
212 #[inline(always)]
213 #[must_use]
214 pub fn atest_out_en_q(&mut self) -> ATEST_OUT_EN_Q_W<20> {
215 ATEST_OUT_EN_Q_W::new(self)
216 }
217 #[doc = "Bit 21"]
218 #[inline(always)]
219 #[must_use]
220 pub fn atest_out_en_i(&mut self) -> ATEST_OUT_EN_I_W<21> {
221 ATEST_OUT_EN_I_W::new(self)
222 }
223 #[doc = "Bit 22"]
224 #[inline(always)]
225 #[must_use]
226 pub fn atest_in_en_q(&mut self) -> ATEST_IN_EN_Q_W<22> {
227 ATEST_IN_EN_Q_W::new(self)
228 }
229 #[doc = "Bit 23"]
230 #[inline(always)]
231 #[must_use]
232 pub fn atest_in_en_i(&mut self) -> ATEST_IN_EN_I_W<23> {
233 ATEST_IN_EN_I_W::new(self)
234 }
235 #[doc = "Writes raw bits to the register."]
236 #[inline(always)]
237 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
238 self.0.bits(bits);
239 self
240 }
241}
242#[doc = "ac test 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 [ten_ac](index.html) module"]
243pub struct TEN_AC_SPEC;
244impl crate::RegisterSpec for TEN_AC_SPEC {
245 type Ux = u32;
246}
247#[doc = "`read()` method returns [ten_ac::R](R) reader structure"]
248impl crate::Readable for TEN_AC_SPEC {
249 type Reader = R;
250}
251#[doc = "`write(|w| ..)` method takes [ten_ac::W](W) writer structure"]
252impl crate::Writable for TEN_AC_SPEC {
253 type Writer = W;
254 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
255 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
256}
257#[doc = "`reset()` method sets ten_ac to value 0"]
258impl crate::Resettable for TEN_AC_SPEC {
259 const RESET_VALUE: Self::Ux = 0;
260}