mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/ieee802154_hal: wait for IFS during transmission
This commit is contained in:
parent
fd81b978fc
commit
0f14f826d1
@ -216,9 +216,16 @@ static void _send(iolist_t *pkt)
|
||||
/* Block until the radio confirms the state change */
|
||||
while(ieee802154_radio_confirm_set_trx_state(&_radio[0]) == -EAGAIN);
|
||||
|
||||
/* Trigger the transmit and wait for the mutex unlock (TX_DONE event) */
|
||||
/* Set the frame filter to receive ACKs */
|
||||
ieee802154_radio_set_frame_filter_mode(&_radio[0], IEEE802154_FILTER_ACK_ONLY);
|
||||
ieee802154_radio_request_transmit(&_radio[0]);
|
||||
|
||||
/* Trigger the transmit and wait for the mutex unlock (TX_DONE event).
|
||||
* Spin if the radio is busy before transmission (this indicates the
|
||||
* transmission is requested before the end of the IFS).
|
||||
* This won't be necessary anymore when the upper layers take care
|
||||
* of the IFS.
|
||||
*/
|
||||
while (ieee802154_radio_request_transmit(&_radio[0]) == -EBUSY) {}
|
||||
mutex_lock(&lock);
|
||||
|
||||
event_post(EVENT_PRIO_HIGHEST, &_tx_finish_ev);
|
||||
|
Loading…
Reference in New Issue
Block a user