nrfxlib API 2.8.99
|
int32_t mpsl_fem_lna_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 LNA using the provided event for the upcoming radio reception.
Multiple configurations can be provided by repeating calls to this function (that is, you can set the activate and the deactivate event in multiple calls, and the configuration is preserved between calls).
The order of calls of this function and its pa
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 LNA 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 LNA will be configured to activate or deactivate when an event occurs.
The function sets up the PPIs and the GPIOTE channel to activate LNA for the upcoming radio transmission. The LNA 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 | LNA activation setup is successful. |
-NRF_EPERM | LNA is currently disabled. |
-NRF_EINVAL | LNA activation setup could not be performed due to invalid or missing configuration parameters in p_activate_event or p_deactivate_event, or both. |