nrfxlib API 2.8.99
|
int32_t mpsl_fem_pa_configuration_set | ( | const mpsl_fem_event_t *const | p_activate_event, |
const mpsl_fem_event_t *const | p_deactivate_event ) |
#include <mpsl/fem/include/protocol/mpsl_fem_protocol_api.h>
Sets up PA using the provided events for the upcoming radio transmission.
Multiple configurations can be provided by repeating calls to this function (that is, you can set the activate and the deactivate events in multiple calls, and the configuration is preserved between calls).
The order of calls of this function and its lna
counterpart must match the order of radio operations. I.e. if you want to listen first and then send the frame, you need first to issue mpsl_fem_lna_configuration_set and only after mpsl_fem_pa_configuration_set.
If a MPSL_FEM_EVENT_TYPE_TIMER timer event is provided, the PA will be configured to activate or deactivate at the application-configured time gap before the timer instance reaches the given register_value. The time gap is set via the corresponding configuration setter of the selected Front End Module.
If a MPSL_FEM_EVENT_TYPE_GENERIC event is provided, the PA will be configured to activate or deactivate when an event occurs.
The function sets up the PPIs and the GPIOTE channel to activate PA for the upcoming radio transmission. The PA pin will be active until deactivated, which can happen either by encountering a configured deactivation event or by using mpsl_fem_deactivate_now.
[in] | p_activate_event | Pointer to the activation event structure. |
[in] | p_deactivate_event | Pointer to the deactivation event structure. |
0 | PA activation setup is successful. |
-NRF_EPERM | PA is currently disabled. |
-NRF_EINVAL | PA activation setup could not be performed due to invalid or missing configuration parameters in p_activate_event or p_deactivate_event, or both. |