mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 06:53:52 +01:00
cpu/nrf5x/radio/nrfmin: wait for state transition
This commit is contained in:
parent
1954807309
commit
22b5f8a41a
@ -163,7 +163,9 @@ static void goto_target_state(void)
|
||||
NRF_RADIO->PACKETPTR = (uint32_t)(&rx_buf);
|
||||
NRF_RADIO->BASE0 = (CONF_ADDR_BASE | my_addr);
|
||||
/* goto RX mode */
|
||||
NRF_RADIO->EVENTS_READY = 0;
|
||||
NRF_RADIO->TASKS_RXEN = 1;
|
||||
while (NRF_RADIO->EVENTS_READY == 0) {}
|
||||
state = STATE_RX;
|
||||
}
|
||||
|
||||
@ -347,8 +349,10 @@ static int nrfmin_send(netdev_t *dev, const iolist_t *iolist)
|
||||
|
||||
/* trigger the actual transmission */
|
||||
DEBUG("[nrfmin] send: putting %i byte into the ether\n", (int)hdr->len);
|
||||
state = STATE_TX;
|
||||
NRF_RADIO->EVENTS_READY = 0;
|
||||
NRF_RADIO->TASKS_TXEN = 1;
|
||||
while (NRF_RADIO->EVENTS_READY == 0) {}
|
||||
state = STATE_TX;
|
||||
|
||||
return (int)pos;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user