bl702_pac/uart/
uart_int_mask.rs1#[doc = "Register `uart_int_mask` reader"]
2pub struct R(crate::R<UART_INT_MASK_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<UART_INT_MASK_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<UART_INT_MASK_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<UART_INT_MASK_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `uart_int_mask` writer"]
17pub struct W(crate::W<UART_INT_MASK_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<UART_INT_MASK_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_INT_MASK_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<UART_INT_MASK_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `cr_utx_end_mask` reader - "]
38pub type CR_UTX_END_MASK_R = crate::BitReader<bool>;
39#[doc = "Field `cr_utx_end_mask` writer - "]
40pub type CR_UTX_END_MASK_W<'a, const O: u8> =
41 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
42#[doc = "Field `cr_urx_end_mask` reader - "]
43pub type CR_URX_END_MASK_R = crate::BitReader<bool>;
44#[doc = "Field `cr_urx_end_mask` writer - "]
45pub type CR_URX_END_MASK_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
47#[doc = "Field `cr_utx_fifo_mask` reader - "]
48pub type CR_UTX_FIFO_MASK_R = crate::BitReader<bool>;
49#[doc = "Field `cr_utx_fifo_mask` writer - "]
50pub type CR_UTX_FIFO_MASK_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
52#[doc = "Field `cr_urx_fifo_mask` reader - "]
53pub type CR_URX_FIFO_MASK_R = crate::BitReader<bool>;
54#[doc = "Field `cr_urx_fifo_mask` writer - "]
55pub type CR_URX_FIFO_MASK_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
57#[doc = "Field `cr_urx_rto_mask` reader - "]
58pub type CR_URX_RTO_MASK_R = crate::BitReader<bool>;
59#[doc = "Field `cr_urx_rto_mask` writer - "]
60pub type CR_URX_RTO_MASK_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
62#[doc = "Field `cr_urx_pce_mask` reader - "]
63pub type CR_URX_PCE_MASK_R = crate::BitReader<bool>;
64#[doc = "Field `cr_urx_pce_mask` writer - "]
65pub type CR_URX_PCE_MASK_W<'a, const O: u8> =
66 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
67#[doc = "Field `cr_utx_fer_mask` reader - "]
68pub type CR_UTX_FER_MASK_R = crate::BitReader<bool>;
69#[doc = "Field `cr_utx_fer_mask` writer - "]
70pub type CR_UTX_FER_MASK_W<'a, const O: u8> =
71 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
72#[doc = "Field `cr_urx_fer_mask` reader - "]
73pub type CR_URX_FER_MASK_R = crate::BitReader<bool>;
74#[doc = "Field `cr_urx_fer_mask` writer - "]
75pub type CR_URX_FER_MASK_W<'a, const O: u8> =
76 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
77#[doc = "Field `cr_urx_lse_mask` reader - "]
78pub type CR_URX_LSE_MASK_R = crate::BitReader<bool>;
79#[doc = "Field `cr_urx_lse_mask` writer - "]
80pub type CR_URX_LSE_MASK_W<'a, const O: u8> =
81 crate::BitWriter<'a, u32, UART_INT_MASK_SPEC, bool, O>;
82impl R {
83 #[doc = "Bit 0"]
84 #[inline(always)]
85 pub fn cr_utx_end_mask(&self) -> CR_UTX_END_MASK_R {
86 CR_UTX_END_MASK_R::new((self.bits & 1) != 0)
87 }
88 #[doc = "Bit 1"]
89 #[inline(always)]
90 pub fn cr_urx_end_mask(&self) -> CR_URX_END_MASK_R {
91 CR_URX_END_MASK_R::new(((self.bits >> 1) & 1) != 0)
92 }
93 #[doc = "Bit 2"]
94 #[inline(always)]
95 pub fn cr_utx_fifo_mask(&self) -> CR_UTX_FIFO_MASK_R {
96 CR_UTX_FIFO_MASK_R::new(((self.bits >> 2) & 1) != 0)
97 }
98 #[doc = "Bit 3"]
99 #[inline(always)]
100 pub fn cr_urx_fifo_mask(&self) -> CR_URX_FIFO_MASK_R {
101 CR_URX_FIFO_MASK_R::new(((self.bits >> 3) & 1) != 0)
102 }
103 #[doc = "Bit 4"]
104 #[inline(always)]
105 pub fn cr_urx_rto_mask(&self) -> CR_URX_RTO_MASK_R {
106 CR_URX_RTO_MASK_R::new(((self.bits >> 4) & 1) != 0)
107 }
108 #[doc = "Bit 5"]
109 #[inline(always)]
110 pub fn cr_urx_pce_mask(&self) -> CR_URX_PCE_MASK_R {
111 CR_URX_PCE_MASK_R::new(((self.bits >> 5) & 1) != 0)
112 }
113 #[doc = "Bit 6"]
114 #[inline(always)]
115 pub fn cr_utx_fer_mask(&self) -> CR_UTX_FER_MASK_R {
116 CR_UTX_FER_MASK_R::new(((self.bits >> 6) & 1) != 0)
117 }
118 #[doc = "Bit 7"]
119 #[inline(always)]
120 pub fn cr_urx_fer_mask(&self) -> CR_URX_FER_MASK_R {
121 CR_URX_FER_MASK_R::new(((self.bits >> 7) & 1) != 0)
122 }
123 #[doc = "Bit 8"]
124 #[inline(always)]
125 pub fn cr_urx_lse_mask(&self) -> CR_URX_LSE_MASK_R {
126 CR_URX_LSE_MASK_R::new(((self.bits >> 8) & 1) != 0)
127 }
128}
129impl W {
130 #[doc = "Bit 0"]
131 #[inline(always)]
132 #[must_use]
133 pub fn cr_utx_end_mask(&mut self) -> CR_UTX_END_MASK_W<0> {
134 CR_UTX_END_MASK_W::new(self)
135 }
136 #[doc = "Bit 1"]
137 #[inline(always)]
138 #[must_use]
139 pub fn cr_urx_end_mask(&mut self) -> CR_URX_END_MASK_W<1> {
140 CR_URX_END_MASK_W::new(self)
141 }
142 #[doc = "Bit 2"]
143 #[inline(always)]
144 #[must_use]
145 pub fn cr_utx_fifo_mask(&mut self) -> CR_UTX_FIFO_MASK_W<2> {
146 CR_UTX_FIFO_MASK_W::new(self)
147 }
148 #[doc = "Bit 3"]
149 #[inline(always)]
150 #[must_use]
151 pub fn cr_urx_fifo_mask(&mut self) -> CR_URX_FIFO_MASK_W<3> {
152 CR_URX_FIFO_MASK_W::new(self)
153 }
154 #[doc = "Bit 4"]
155 #[inline(always)]
156 #[must_use]
157 pub fn cr_urx_rto_mask(&mut self) -> CR_URX_RTO_MASK_W<4> {
158 CR_URX_RTO_MASK_W::new(self)
159 }
160 #[doc = "Bit 5"]
161 #[inline(always)]
162 #[must_use]
163 pub fn cr_urx_pce_mask(&mut self) -> CR_URX_PCE_MASK_W<5> {
164 CR_URX_PCE_MASK_W::new(self)
165 }
166 #[doc = "Bit 6"]
167 #[inline(always)]
168 #[must_use]
169 pub fn cr_utx_fer_mask(&mut self) -> CR_UTX_FER_MASK_W<6> {
170 CR_UTX_FER_MASK_W::new(self)
171 }
172 #[doc = "Bit 7"]
173 #[inline(always)]
174 #[must_use]
175 pub fn cr_urx_fer_mask(&mut self) -> CR_URX_FER_MASK_W<7> {
176 CR_URX_FER_MASK_W::new(self)
177 }
178 #[doc = "Bit 8"]
179 #[inline(always)]
180 #[must_use]
181 pub fn cr_urx_lse_mask(&mut self) -> CR_URX_LSE_MASK_W<8> {
182 CR_URX_LSE_MASK_W::new(self)
183 }
184 #[doc = "Writes raw bits to the register."]
185 #[inline(always)]
186 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
187 self.0.bits(bits);
188 self
189 }
190}
191#[doc = "UART interrupt mask\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_int_mask](index.html) module"]
192pub struct UART_INT_MASK_SPEC;
193impl crate::RegisterSpec for UART_INT_MASK_SPEC {
194 type Ux = u32;
195}
196#[doc = "`read()` method returns [uart_int_mask::R](R) reader structure"]
197impl crate::Readable for UART_INT_MASK_SPEC {
198 type Reader = R;
199}
200#[doc = "`write(|w| ..)` method takes [uart_int_mask::W](W) writer structure"]
201impl crate::Writable for UART_INT_MASK_SPEC {
202 type Writer = W;
203 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
204 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
205}
206#[doc = "`reset()` method sets uart_int_mask to value 0"]
207impl crate::Resettable for UART_INT_MASK_SPEC {
208 const RESET_VALUE: Self::Ux = 0;
209}