Benjamin David Lunt 43dd4164fe
Fix zero length packet handling (#73)
This fixes zero length packet handling.
See the following example that requests 128 bytes:

```
SETUP(8)
IN(64)
IN(64)
STATUS(0)
```

The current code erroneously assumes that there are no more IN packets
after the first two 64-byte packets.

However, what happens with the following:

```
SETUP(8)
IN(64)
IN(64)
IN(64)    <--- current code assumes this will be, and expects a STATUS packet
STATUS(0)
```

Currently, the third IN(64) above will result in a coding error because
the code is expecting the STATUS packet, not another IN packet.

The "controller" must allow for more packets than expected, returning a
short packet detect on the third IN(64) packet shown above, actually
returning zero bytes, hence the Short Packet Detect.

This patch was tested on WinXP, Win7, and Win10.
2023-09-07 08:04:10 +03:00
..
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-04-09 10:54:08 -07:00
2023-04-09 10:44:00 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00
2023-03-31 18:33:38 -07:00