1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Added an RTOS detection is 2 places because I'm using this file on the modem (without an RTOS). #if defined(PIOS_INCLUDE_FREERTOS) ...

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1595 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-09-12 10:33:45 +00:00 committed by pip
parent 59758122e1
commit 9fca16db41

View File

@ -191,8 +191,12 @@ void sendChunk()
tx_buffer[1] = size; /* valid data length */
/* Wait for any pending transmissions to complete */
while(GetEPTxStatus(ENDP1) == EP_TX_VALID)
taskYIELD();
while(GetEPTxStatus(ENDP1) == EP_TX_VALID)
{
#if defined(PIOS_INCLUDE_FREERTOS)
taskYIELD();
#endif
}
UserToPMABufferCopy((uint8_t*) tx_buffer, GetEPTxAddr(EP1_IN & 0x7F), size+2);
SetEPTxCount((EP1_IN & 0x7F), PIOS_USB_HID_DATA_LENGTH+2);
@ -247,7 +251,11 @@ int32_t PIOS_USB_HID_TxBufferPutMore(uint8_t id, const uint8_t *buffer, uint16_t
return error;
while( bufferBufferedData(&txBuffer) )
taskYIELD();
{
#if defined(PIOS_INCLUDE_FREERTOS)
taskYIELD();
#endif
}
return 0;
}