From 094f3dea0b9388c1794029709e7ecb1efbdf1249 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 20 Oct 2017 15:17:03 +0200 Subject: [PATCH] FIX: Found the little bugger which has been haunting me for sometime now. Maybe I can test my other new things?... --- common/usb_cdc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/usb_cdc.c b/common/usb_cdc.c index b4e357b17..3c04198d4 100644 --- a/common/usb_cdc.c +++ b/common/usb_cdc.c @@ -741,8 +741,7 @@ void AT91F_USB_SendData(AT91PS_UDP pUdp, const char *pData, uint32_t length) { //*---------------------------------------------------------------------------- void AT91F_USB_SendZlp(AT91PS_UDP pUdp) { UDP_SET_EP_FLAGS(AT91C_EP_CONTROL, AT91C_UDP_TXPKTRDY); - while ( !(pUdp->UDP_CSR[AT91C_EP_CONTROL] & AT91C_UDP_TXPKTRDY) ); - + while ( !(pUdp->UDP_CSR[AT91C_EP_CONTROL] & AT91C_UDP_TXCOMP) ); UDP_CLEAR_EP_FLAGS(AT91C_EP_CONTROL, AT91C_UDP_TXCOMP); while (pUdp->UDP_CSR[AT91C_EP_CONTROL] & AT91C_UDP_TXCOMP); }