Skip to content

Commit 7a00175

Browse files
dgoodladCryowatt
authored andcommitted
Enable the end point after setting even/odd frame
1 parent 7ada005 commit 7a00175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ impl EndpointIn {
144144
#[cfg(feature = "hs")]
145145
write_reg!(endpoint_in, ep, DIEPTSIZ, MCNT: 1, PKTCNT: 1, XFRSIZ: buf.len() as u32);
146146

147-
modify_reg!(endpoint_in, ep, DIEPCTL, CNAK: 1, EPENA: 1);
148-
149147
match self.descriptor.ep_type {
150148
// Isochronous endpoints must set the correct even/odd frame bit to
151149
// correspond with the next frame's number.
@@ -163,6 +161,8 @@ impl EndpointIn {
163161
_ => {}
164162
}
165163

164+
modify_reg!(endpoint_in, ep, DIEPCTL, CNAK: 1, EPENA: 1);
165+
166166
fifo_write(self.usb, self.index(), buf);
167167

168168
Ok(())

0 commit comments

Comments
 (0)