Browse Source

Merge pull request #5915 from aeneby/send_wait_v2

cpu/cc2538: Wait for transmission to complete before returning from send()
pr/spi.typo
Sebastian Meiling 6 years ago committed by GitHub
parent
commit
be38643a2d
  1. 3
      cpu/cc2538/radio/cc2538_rf_netdev.c

3
cpu/cc2538/radio/cc2538_rf_netdev.c

@ -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;
}

Loading…
Cancel
Save