Skip to content

Commit

Permalink
Fix impementation of STALL_EP0().
Browse files Browse the repository at this point in the history
Error discovered by @VioletEternity.

The new implementation follows the TRM exactly.
  • Loading branch information
whitequark committed Aug 4, 2023
1 parent 82d1541 commit 8251388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/library/include/fx2usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void usb_init(bool disconnect);
* Indicate an error in response to a EP0 transfer.
*/
#define STALL_EP0() \
do { EP0CS = _STALL; } while(0)
do { EP0CS = _STALL; EP0CS = _HSNAK; } while(0)

/**
* Return a EPnCS register for given USB endpoint index, or 0
Expand Down

0 comments on commit 8251388

Please sign in to comment.