From 34af9ac92dc6b5c48b3d6af9186dbc1e01c57e55 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Mon, 26 Dec 2011 17:09:08 -0500 Subject: [PATCH] usb_com: NAK rather than STALL on buffer full STALL should only be used to indicate an error has occurred. NAK is the correct mechanism to provide backpressure. --- flight/PiOS/STM32F10x/pios_usb_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/PiOS/STM32F10x/pios_usb_com.c b/flight/PiOS/STM32F10x/pios_usb_com.c index a9c9b4bb7..ac758b808 100644 --- a/flight/PiOS/STM32F10x/pios_usb_com.c +++ b/flight/PiOS/STM32F10x/pios_usb_com.c @@ -490,7 +490,7 @@ static void PIOS_USB_COM_CDC_DATA_EP_OUT_Callback(void) SetEPRxStatus(usb_com_dev->cfg->data_rx_ep, EP_RX_VALID); } else { /* Not enough room left for a message, apply backpressure */ - SetEPRxStatus(usb_com_dev->cfg->data_rx_ep, EP_RX_STALL); + SetEPRxStatus(usb_com_dev->cfg->data_rx_ep, EP_RX_NAK); } #if defined(PIOS_INCLUDE_FREERTOS)