stm32f7/stm32f7x9/otg_hs_host/
otg_hs_hcintmsk4.rs1#[doc = "Register `OTG_HS_HCINTMSK4` reader"]
2pub struct R(crate::R<OTG_HS_HCINTMSK4_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<OTG_HS_HCINTMSK4_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<OTG_HS_HCINTMSK4_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<OTG_HS_HCINTMSK4_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `OTG_HS_HCINTMSK4` writer"]
17pub struct W(crate::W<OTG_HS_HCINTMSK4_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<OTG_HS_HCINTMSK4_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<OTG_HS_HCINTMSK4_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<OTG_HS_HCINTMSK4_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `XFRCM` reader - Transfer completed mask"]
38pub type XFRCM_R = crate::BitReader<bool>;
39#[doc = "Field `XFRCM` writer - Transfer completed mask"]
40pub type XFRCM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
41#[doc = "Field `CHHM` reader - Channel halted mask"]
42pub type CHHM_R = crate::BitReader<bool>;
43#[doc = "Field `CHHM` writer - Channel halted mask"]
44pub type CHHM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
45#[doc = "Field `AHBERR` reader - AHB error"]
46pub type AHBERR_R = crate::BitReader<bool>;
47#[doc = "Field `AHBERR` writer - AHB error"]
48pub type AHBERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
49#[doc = "Field `STALLM` reader - STALL response received interrupt mask"]
50pub type STALLM_R = crate::BitReader<bool>;
51#[doc = "Field `STALLM` writer - STALL response received interrupt mask"]
52pub type STALLM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
53#[doc = "Field `NAKM` reader - NAK response received interrupt mask"]
54pub type NAKM_R = crate::BitReader<bool>;
55#[doc = "Field `NAKM` writer - NAK response received interrupt mask"]
56pub type NAKM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
57#[doc = "Field `ACKM` reader - ACK response received/transmitted interrupt mask"]
58pub type ACKM_R = crate::BitReader<bool>;
59#[doc = "Field `ACKM` writer - ACK response received/transmitted interrupt mask"]
60pub type ACKM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
61#[doc = "Field `NYET` reader - response received interrupt mask"]
62pub type NYET_R = crate::BitReader<bool>;
63#[doc = "Field `NYET` writer - response received interrupt mask"]
64pub type NYET_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
65#[doc = "Field `TXERRM` reader - Transaction error mask"]
66pub type TXERRM_R = crate::BitReader<bool>;
67#[doc = "Field `TXERRM` writer - Transaction error mask"]
68pub type TXERRM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
69#[doc = "Field `BBERRM` reader - Babble error mask"]
70pub type BBERRM_R = crate::BitReader<bool>;
71#[doc = "Field `BBERRM` writer - Babble error mask"]
72pub type BBERRM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
73#[doc = "Field `FRMORM` reader - Frame overrun mask"]
74pub type FRMORM_R = crate::BitReader<bool>;
75#[doc = "Field `FRMORM` writer - Frame overrun mask"]
76pub type FRMORM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
77#[doc = "Field `DTERRM` reader - Data toggle error mask"]
78pub type DTERRM_R = crate::BitReader<bool>;
79#[doc = "Field `DTERRM` writer - Data toggle error mask"]
80pub type DTERRM_W<'a, const O: u8> = crate::BitWriter<'a, u32, OTG_HS_HCINTMSK4_SPEC, bool, O>;
81impl R {
82 #[doc = "Bit 0 - Transfer completed mask"]
83 #[inline(always)]
84 pub fn xfrcm(&self) -> XFRCM_R {
85 XFRCM_R::new((self.bits & 1) != 0)
86 }
87 #[doc = "Bit 1 - Channel halted mask"]
88 #[inline(always)]
89 pub fn chhm(&self) -> CHHM_R {
90 CHHM_R::new(((self.bits >> 1) & 1) != 0)
91 }
92 #[doc = "Bit 2 - AHB error"]
93 #[inline(always)]
94 pub fn ahberr(&self) -> AHBERR_R {
95 AHBERR_R::new(((self.bits >> 2) & 1) != 0)
96 }
97 #[doc = "Bit 3 - STALL response received interrupt mask"]
98 #[inline(always)]
99 pub fn stallm(&self) -> STALLM_R {
100 STALLM_R::new(((self.bits >> 3) & 1) != 0)
101 }
102 #[doc = "Bit 4 - NAK response received interrupt mask"]
103 #[inline(always)]
104 pub fn nakm(&self) -> NAKM_R {
105 NAKM_R::new(((self.bits >> 4) & 1) != 0)
106 }
107 #[doc = "Bit 5 - ACK response received/transmitted interrupt mask"]
108 #[inline(always)]
109 pub fn ackm(&self) -> ACKM_R {
110 ACKM_R::new(((self.bits >> 5) & 1) != 0)
111 }
112 #[doc = "Bit 6 - response received interrupt mask"]
113 #[inline(always)]
114 pub fn nyet(&self) -> NYET_R {
115 NYET_R::new(((self.bits >> 6) & 1) != 0)
116 }
117 #[doc = "Bit 7 - Transaction error mask"]
118 #[inline(always)]
119 pub fn txerrm(&self) -> TXERRM_R {
120 TXERRM_R::new(((self.bits >> 7) & 1) != 0)
121 }
122 #[doc = "Bit 8 - Babble error mask"]
123 #[inline(always)]
124 pub fn bberrm(&self) -> BBERRM_R {
125 BBERRM_R::new(((self.bits >> 8) & 1) != 0)
126 }
127 #[doc = "Bit 9 - Frame overrun mask"]
128 #[inline(always)]
129 pub fn frmorm(&self) -> FRMORM_R {
130 FRMORM_R::new(((self.bits >> 9) & 1) != 0)
131 }
132 #[doc = "Bit 10 - Data toggle error mask"]
133 #[inline(always)]
134 pub fn dterrm(&self) -> DTERRM_R {
135 DTERRM_R::new(((self.bits >> 10) & 1) != 0)
136 }
137}
138impl W {
139 #[doc = "Bit 0 - Transfer completed mask"]
140 #[inline(always)]
141 pub fn xfrcm(&mut self) -> XFRCM_W<0> {
142 XFRCM_W::new(self)
143 }
144 #[doc = "Bit 1 - Channel halted mask"]
145 #[inline(always)]
146 pub fn chhm(&mut self) -> CHHM_W<1> {
147 CHHM_W::new(self)
148 }
149 #[doc = "Bit 2 - AHB error"]
150 #[inline(always)]
151 pub fn ahberr(&mut self) -> AHBERR_W<2> {
152 AHBERR_W::new(self)
153 }
154 #[doc = "Bit 3 - STALL response received interrupt mask"]
155 #[inline(always)]
156 pub fn stallm(&mut self) -> STALLM_W<3> {
157 STALLM_W::new(self)
158 }
159 #[doc = "Bit 4 - NAK response received interrupt mask"]
160 #[inline(always)]
161 pub fn nakm(&mut self) -> NAKM_W<4> {
162 NAKM_W::new(self)
163 }
164 #[doc = "Bit 5 - ACK response received/transmitted interrupt mask"]
165 #[inline(always)]
166 pub fn ackm(&mut self) -> ACKM_W<5> {
167 ACKM_W::new(self)
168 }
169 #[doc = "Bit 6 - response received interrupt mask"]
170 #[inline(always)]
171 pub fn nyet(&mut self) -> NYET_W<6> {
172 NYET_W::new(self)
173 }
174 #[doc = "Bit 7 - Transaction error mask"]
175 #[inline(always)]
176 pub fn txerrm(&mut self) -> TXERRM_W<7> {
177 TXERRM_W::new(self)
178 }
179 #[doc = "Bit 8 - Babble error mask"]
180 #[inline(always)]
181 pub fn bberrm(&mut self) -> BBERRM_W<8> {
182 BBERRM_W::new(self)
183 }
184 #[doc = "Bit 9 - Frame overrun mask"]
185 #[inline(always)]
186 pub fn frmorm(&mut self) -> FRMORM_W<9> {
187 FRMORM_W::new(self)
188 }
189 #[doc = "Bit 10 - Data toggle error mask"]
190 #[inline(always)]
191 pub fn dterrm(&mut self) -> DTERRM_W<10> {
192 DTERRM_W::new(self)
193 }
194 #[doc = "Writes raw bits to the register."]
195 #[inline(always)]
196 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
197 self.0.bits(bits);
198 self
199 }
200}
201#[doc = "OTG_HS host channel-4 interrupt mask 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 [otg_hs_hcintmsk4](index.html) module"]
202pub struct OTG_HS_HCINTMSK4_SPEC;
203impl crate::RegisterSpec for OTG_HS_HCINTMSK4_SPEC {
204 type Ux = u32;
205}
206#[doc = "`read()` method returns [otg_hs_hcintmsk4::R](R) reader structure"]
207impl crate::Readable for OTG_HS_HCINTMSK4_SPEC {
208 type Reader = R;
209}
210#[doc = "`write(|w| ..)` method takes [otg_hs_hcintmsk4::W](W) writer structure"]
211impl crate::Writable for OTG_HS_HCINTMSK4_SPEC {
212 type Writer = W;
213}
214#[doc = "`reset()` method sets OTG_HS_HCINTMSK4 to value 0"]
215impl crate::Resettable for OTG_HS_HCINTMSK4_SPEC {
216 #[inline(always)]
217 fn reset_value() -> Self::Ux {
218 0
219 }
220}