cpu/cc2538: Wait for transmission to complete before returning from send()

This commit is contained in:
Aaron Sowry 2016-10-07 12:25:38 +13:00
parent 7337dadad4
commit 191dc0ffad
1 changed files with 3 additions and 0 deletions

View File

@ -283,6 +283,9 @@ static int _send(netdev2_t *netdev, const struct iovec *vector, unsigned count)
RFCORE_SFR_RFST = ISTXON;
/* Wait for transmission to complete */
RFCORE_WAIT_UNTIL(RFCORE->XREG_FSMSTAT1bits.TX_ACTIVE == 0);
return pkt_len;
}