static void
ao_radio_wait_isr(uint16_t timeout)
{
- if (timeout)
- ao_alarm(timeout);
-
ao_arch_block_interrupts();
while (!ao_radio_wake && !ao_radio_abort)
- if (ao_sleep(&ao_radio_wake))
+ if (ao_sleep_for(&ao_radio_wake, timeout))
ao_radio_abort = 1;
ao_arch_release_interrupts();
-
- if (timeout)
- ao_clear_alarm();
}
static void
/* Check to see if the packet header has been seen, in which case we'll
* want to keep waiting for the rest of the packet to appear
*/
- if (modem_status1 & ((1 << CC1200_MODEM_STATUS1_SYNC_FOUND) |
- (1 << CC1200_MODEM_STATUS1_PQT_REACHED)))
+ if (modem_status1 & (1 << CC1200_MODEM_STATUS1_SYNC_FOUND))
{
ao_radio_abort = 0;