nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_802154_receive_at_scheduled_cancel()

bool nrf_802154_receive_at_scheduled_cancel ( uint32_t id)

#include <nrf_802154/common/include/nrf_802154.h>

Cancels a delayed reception scheduled by a call to nrf_802154_receive_at.

If the receive window has been scheduled but has not started yet, this function prevents entering the receive window. If the receive window has been scheduled and has already started, the receive window is not affected and will continue until its scheduled timeout.

The function also returns success when no window with given ID is scheduled and is not currently ongoing.

Note
This function differs from nrf_802154_receive_at_cancel in two aspects:
  1. This function can only cancel receive windows that are scheduled, but haven't started yet. If the receive window has already started, the cancel will end with failure and the receive window will last for the planned duration, ending with nrf_802154_receive_failed notification with NRF_802154_RX_ERROR_DELAYED_TIMEOUT status.
  2. If there are no scheduled and ongoing receive windows matching the given ID, the function ends with a success.
Parameters
[in]idIdentifier of the delayed reception window to be cancelled. If the provided value does not refer to any scheduled or active receive window, the function returns true.
Return values
trueThe delayed reception was scheduled and successfully cancelled or the receive window was not scheduled at all.
falseThe scheduled window is currently ongoing.