Skip to content

Commit 413b77c

Browse files
authored
Merge pull request #50 from ithinuel/master
Handle StatusOut during DataIn Phase.
2 parents 202e5ee + 6824c32 commit 413b77c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/control_pipe.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ impl<B: UsbBus> ControlPipe<'_, B> {
150150
}
151151
// The host may terminate a DATA stage early by sending a zero-length status packet
152152
// acknowledging the data we sent it.
153-
ControlState::StatusOut | ControlState::DataIn | ControlState::DataInLast => {
153+
ControlState::DataIn
154+
| ControlState::DataInLast
155+
| ControlState::DataInZlp
156+
| ControlState::StatusOut => {
154157
self.ep_out.read(&mut []).ok();
155158
self.state = ControlState::Idle;
156159
}

0 commit comments

Comments
 (0)