Merge pull request #4449 from c1728p9/lpc1768_fix

Fix semaphore usage on lpc1768 emac
pull/4452/merge
Sam Grove 2017-06-07 21:49:25 -05:00 committed by GitHub
commit 28eaac360a
1 changed files with 4 additions and 1 deletions

View File

@ -604,10 +604,13 @@ static err_t lpc_low_level_output(struct netif *netif, struct pbuf *p)
/* Wait until enough descriptors are available for the transfer. */
/* THIS WILL BLOCK UNTIL THERE ARE ENOUGH DESCRIPTORS AVAILABLE */
while (dn > lpc_tx_ready(netif))
#if NO_SYS == 0
for (idx = 0; idx < dn; idx++) {
osSemaphoreAcquire(lpc_enetif->xTXDCountSem.id, osWaitForever);
}
MBED_ASSERT(dn <= lpc_tx_ready(netif));
#else
while (dn > lpc_tx_ready(netif))
osDelay(1);
#endif