Skip to content

Commit

Permalink
Treat SETUP packets with non-zero EP num as indicating OUT direction.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling committed Aug 27, 2024
1 parent 94cab7a commit 64af464
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,11 @@ impl Decoder {
let dev_addr = token.device_address();
let ep_num = token.endpoint_number();
let direction = match (ep_num.0, pid) {
(0, _) => Direction::Out,
(_, PID::IN) => Direction::In,
(_, PID::OUT) => Direction::Out,
(_, PID::PING) => Direction::Out,
(0, _) => Direction::Out,
(_, PID::SETUP) => Direction::Out,
(_, PID::IN) => Direction::In,
(_, PID::OUT) => Direction::Out,
(_, PID::PING) => Direction::Out,
_ => bail!("PID {pid} does not indicate a direction")
};
let key = EndpointKey {
Expand Down

0 comments on commit 64af464

Please sign in to comment.