nrfxlib API 2.8.99
|
int32_t mpsl_timeslot_request | ( | mpsl_timeslot_session_id_t | session_id, |
mpsl_timeslot_request_t const * | p_request ) |
#include <mpsl/include/mpsl_timeslot.h>
Requests a timeslot.
Successful requests will result in mpsl_timeslot_signal_callback_t(MPSL_TIMESLOT_SIGNAL_START). Unsuccessful requests will result in a MPSL_TIMESLOT_SIGNAL_BLOCKED event.
Once the timeslot has started, the application is responsible for keeping track of timing within the timeslot and for ensuring that the application’s use of the peripherals does not last for longer than the granted timeslot length. The recommended practice is to set up a timer interrupt that expires before the timeslot expires, with enough time left for the timeslot to do any clean-up actions before the timeslot ends. Such a timer interrupt can also be used to request an extension of the timeslot, but there must still be enough time to clean up if the extension is not granted.
[in] | session_id | The session identifier as returned by mpsl_timeslot_session_open. |
[in] | p_request | Pointer to the request parameters. |
0 | Success |
-NRF_EINVAL | The parameters of p_request are not valid |
-NRF_ENOENT | The session is not open. |
-NRF_EAGAIN | The session is not IDLE. |