mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4449 from c1728p9/lpc1768_fix
Fix semaphore usage on lpc1768 emacpull/4452/merge
commit
28eaac360a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue