1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

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.
This commit is contained in:
Stacey Sheldon 2011-12-26 17:09:08 -05:00
parent e2bb7140fe
commit 34af9ac92d

View File

@ -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); SetEPRxStatus(usb_com_dev->cfg->data_rx_ep, EP_RX_VALID);
} else { } else {
/* Not enough room left for a message, apply backpressure */ /* 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) #if defined(PIOS_INCLUDE_FREERTOS)