From 8251388fa26b2754ab768c2a909078254f3904f4 Mon Sep 17 00:00:00 2001 From: Catherine Date: Fri, 4 Aug 2023 21:11:29 +0000 Subject: [PATCH] Fix impementation of `STALL_EP0()`. Error discovered by @VioletEternity. The new implementation follows the TRM exactly. --- firmware/library/include/fx2usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/library/include/fx2usb.h b/firmware/library/include/fx2usb.h index b37f1b7..0675d06 100644 --- a/firmware/library/include/fx2usb.h +++ b/firmware/library/include/fx2usb.h @@ -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