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

◆ mpsl_radio_notification_cfg_set()

int32_t mpsl_radio_notification_cfg_set ( uint8_t type,
uint16_t distance_us,
mpsl_radio_notification_cb_t cb )

#include <mpsl/include/mpsl_radio_notification.h>

Configures the Radio Notification signal.

Note
  • The notification signal is given immediately before or after radio activity as a callback.
  • To ensure that the radio notification signal behaves in a consistent way, the radio notifications must be configured when there is no protocol stack enabled. It is recommended that the radio notification signal is configured directly after the MPSL is enabled.
Parameters
[in]typeType of notification signal, see MPSL_RADIO_NOTIFICATION_TYPES. MPSL_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio notification. Using MPSL_RADIO_NOTIFICATION_DISTANCE_NONE is recommended (but not required) to be used with MPSL_RADIO_NOTIFICATION_TYPE_NONE.
[in]distance_usDistance between the notification signal and start of radio activity. This parameter is ignored when MPSL_RADIO_NOTIFICATION_TYPE_NONE or MPSL_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used. For other notification types, the value of this parameter must be between MPSL_RADIO_NOTIFICATION_DISTANCE_MIN_US and MPSL_RADIO_NOTIFICATION_DISTANCE_MAX_US.
[in]cbCallback for the notification. This is called from priority level 0. The application is responsible for spending as little time in this callback as possible. Therefore the recommended usage for this callback is to pend interrupt(s) with a lower priority.
Return values
-NRF_EINVALInvalid parameters supplied.
-NRF_EINPROGRESSA protocol stack or other SoftDevice is running. Stop all running activities and retry.
0Success