1#[doc = "Register `UART_ITIP` reader"]
2pub struct R(crate::R<UART_ITIP_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<UART_ITIP_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<UART_ITIP_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<UART_ITIP_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `UART_ITIP` writer"]
17pub struct W(crate::W<UART_ITIP_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<UART_ITIP_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<UART_ITIP_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<UART_ITIP_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `UARTRXD` reader - "]
38pub struct UARTRXD_R(crate::FieldReader<bool, bool>);
39impl UARTRXD_R {
40 #[inline(always)]
41 pub(crate) fn new(bits: bool) -> Self {
42 UARTRXD_R(crate::FieldReader::new(bits))
43 }
44}
45impl core::ops::Deref for UARTRXD_R {
46 type Target = crate::FieldReader<bool, bool>;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 &self.0
50 }
51}
52#[doc = "Field `SIRIN` reader - "]
53pub struct SIRIN_R(crate::FieldReader<bool, bool>);
54impl SIRIN_R {
55 #[inline(always)]
56 pub(crate) fn new(bits: bool) -> Self {
57 SIRIN_R(crate::FieldReader::new(bits))
58 }
59}
60impl core::ops::Deref for SIRIN_R {
61 type Target = crate::FieldReader<bool, bool>;
62 #[inline(always)]
63 fn deref(&self) -> &Self::Target {
64 &self.0
65 }
66}
67#[doc = "Field `nUARTDSR` reader - "]
68pub struct NUARTDSR_R(crate::FieldReader<bool, bool>);
69impl NUARTDSR_R {
70 #[inline(always)]
71 pub(crate) fn new(bits: bool) -> Self {
72 NUARTDSR_R(crate::FieldReader::new(bits))
73 }
74}
75impl core::ops::Deref for NUARTDSR_R {
76 type Target = crate::FieldReader<bool, bool>;
77 #[inline(always)]
78 fn deref(&self) -> &Self::Target {
79 &self.0
80 }
81}
82#[doc = "Field `nUARTCTS` reader - "]
83pub struct NUARTCTS_R(crate::FieldReader<bool, bool>);
84impl NUARTCTS_R {
85 #[inline(always)]
86 pub(crate) fn new(bits: bool) -> Self {
87 NUARTCTS_R(crate::FieldReader::new(bits))
88 }
89}
90impl core::ops::Deref for NUARTCTS_R {
91 type Target = crate::FieldReader<bool, bool>;
92 #[inline(always)]
93 fn deref(&self) -> &Self::Target {
94 &self.0
95 }
96}
97#[doc = "Field `nUARTDCD` reader - "]
98pub struct NUARTDCD_R(crate::FieldReader<bool, bool>);
99impl NUARTDCD_R {
100 #[inline(always)]
101 pub(crate) fn new(bits: bool) -> Self {
102 NUARTDCD_R(crate::FieldReader::new(bits))
103 }
104}
105impl core::ops::Deref for NUARTDCD_R {
106 type Target = crate::FieldReader<bool, bool>;
107 #[inline(always)]
108 fn deref(&self) -> &Self::Target {
109 &self.0
110 }
111}
112#[doc = "Field `nUARTRI` reader - "]
113pub struct NUARTRI_R(crate::FieldReader<bool, bool>);
114impl NUARTRI_R {
115 #[inline(always)]
116 pub(crate) fn new(bits: bool) -> Self {
117 NUARTRI_R(crate::FieldReader::new(bits))
118 }
119}
120impl core::ops::Deref for NUARTRI_R {
121 type Target = crate::FieldReader<bool, bool>;
122 #[inline(always)]
123 fn deref(&self) -> &Self::Target {
124 &self.0
125 }
126}
127#[doc = "Field `UARTRXDMACLR` reader - "]
128pub struct UARTRXDMACLR_R(crate::FieldReader<bool, bool>);
129impl UARTRXDMACLR_R {
130 #[inline(always)]
131 pub(crate) fn new(bits: bool) -> Self {
132 UARTRXDMACLR_R(crate::FieldReader::new(bits))
133 }
134}
135impl core::ops::Deref for UARTRXDMACLR_R {
136 type Target = crate::FieldReader<bool, bool>;
137 #[inline(always)]
138 fn deref(&self) -> &Self::Target {
139 &self.0
140 }
141}
142#[doc = "Field `UARTRXDMACLR` writer - "]
143pub struct UARTRXDMACLR_W<'a> {
144 w: &'a mut W,
145}
146impl<'a> UARTRXDMACLR_W<'a> {
147 #[doc = r"Sets the field bit"]
148 #[inline(always)]
149 pub fn set_bit(self) -> &'a mut W {
150 self.bit(true)
151 }
152 #[doc = r"Clears the field bit"]
153 #[inline(always)]
154 pub fn clear_bit(self) -> &'a mut W {
155 self.bit(false)
156 }
157 #[doc = r"Writes raw bits to the field"]
158 #[inline(always)]
159 pub fn bit(self, value: bool) -> &'a mut W {
160 self.w.bits =
161 (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
162 self.w
163 }
164}
165#[doc = "Field `UARTTXDMACLR` reader - "]
166pub struct UARTTXDMACLR_R(crate::FieldReader<bool, bool>);
167impl UARTTXDMACLR_R {
168 #[inline(always)]
169 pub(crate) fn new(bits: bool) -> Self {
170 UARTTXDMACLR_R(crate::FieldReader::new(bits))
171 }
172}
173impl core::ops::Deref for UARTTXDMACLR_R {
174 type Target = crate::FieldReader<bool, bool>;
175 #[inline(always)]
176 fn deref(&self) -> &Self::Target {
177 &self.0
178 }
179}
180#[doc = "Field `UARTTXDMACLR` writer - "]
181pub struct UARTTXDMACLR_W<'a> {
182 w: &'a mut W,
183}
184impl<'a> UARTTXDMACLR_W<'a> {
185 #[doc = r"Sets the field bit"]
186 #[inline(always)]
187 pub fn set_bit(self) -> &'a mut W {
188 self.bit(true)
189 }
190 #[doc = r"Clears the field bit"]
191 #[inline(always)]
192 pub fn clear_bit(self) -> &'a mut W {
193 self.bit(false)
194 }
195 #[doc = r"Writes raw bits to the field"]
196 #[inline(always)]
197 pub fn bit(self, value: bool) -> &'a mut W {
198 self.w.bits =
199 (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
200 self.w
201 }
202}
203impl R {
204 #[doc = "Bit 0"]
205 #[inline(always)]
206 pub fn uartrxd(&self) -> UARTRXD_R {
207 UARTRXD_R::new((self.bits & 0x01) != 0)
208 }
209 #[doc = "Bit 1"]
210 #[inline(always)]
211 pub fn sirin(&self) -> SIRIN_R {
212 SIRIN_R::new(((self.bits >> 1) & 0x01) != 0)
213 }
214 #[doc = "Bit 2"]
215 #[inline(always)]
216 pub fn n_uartdsr(&self) -> NUARTDSR_R {
217 NUARTDSR_R::new(((self.bits >> 2) & 0x01) != 0)
218 }
219 #[doc = "Bit 3"]
220 #[inline(always)]
221 pub fn n_uartcts(&self) -> NUARTCTS_R {
222 NUARTCTS_R::new(((self.bits >> 3) & 0x01) != 0)
223 }
224 #[doc = "Bit 4"]
225 #[inline(always)]
226 pub fn n_uartdcd(&self) -> NUARTDCD_R {
227 NUARTDCD_R::new(((self.bits >> 4) & 0x01) != 0)
228 }
229 #[doc = "Bit 5"]
230 #[inline(always)]
231 pub fn n_uartri(&self) -> NUARTRI_R {
232 NUARTRI_R::new(((self.bits >> 5) & 0x01) != 0)
233 }
234 #[doc = "Bit 6"]
235 #[inline(always)]
236 pub fn uartrxdmaclr(&self) -> UARTRXDMACLR_R {
237 UARTRXDMACLR_R::new(((self.bits >> 6) & 0x01) != 0)
238 }
239 #[doc = "Bit 7"]
240 #[inline(always)]
241 pub fn uarttxdmaclr(&self) -> UARTTXDMACLR_R {
242 UARTTXDMACLR_R::new(((self.bits >> 7) & 0x01) != 0)
243 }
244}
245impl W {
246 #[doc = "Bit 6"]
247 #[inline(always)]
248 pub fn uartrxdmaclr(&mut self) -> UARTRXDMACLR_W {
249 UARTRXDMACLR_W { w: self }
250 }
251 #[doc = "Bit 7"]
252 #[inline(always)]
253 pub fn uarttxdmaclr(&mut self) -> UARTTXDMACLR_W {
254 UARTTXDMACLR_W { w: self }
255 }
256 #[doc = "Writes raw bits to the register."]
257 #[inline(always)]
258 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
259 self.0.bits(bits);
260 self
261 }
262}
263#[doc = "Integration test input 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 [uart_itip](index.html) module"]
264pub struct UART_ITIP_SPEC;
265impl crate::RegisterSpec for UART_ITIP_SPEC {
266 type Ux = u32;
267}
268#[doc = "`read()` method returns [uart_itip::R](R) reader structure"]
269impl crate::Readable for UART_ITIP_SPEC {
270 type Reader = R;
271}
272#[doc = "`write(|w| ..)` method takes [uart_itip::W](W) writer structure"]
273impl crate::Writable for UART_ITIP_SPEC {
274 type Writer = W;
275}
276#[doc = "`reset()` method sets UART_ITIP to value 0"]
277impl crate::Resettable for UART_ITIP_SPEC {
278 #[inline(always)]
279 fn reset_value() -> Self::Ux {
280 0
281 }
282}