nrfxlib API 0.1.0
Loading...
Searching...
No Matches
mpsl_fem_protocol_api.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <nrf.h>
#include <nrf_peripherals.h>
#include "nrf_errno.h"
#include "mpsl_tx_power.h"
#include "mpsl_fem_types.h"

Go to the source code of this file.

Data Structures

struct  mpsl_fem_event_t
 MPSL Front End Module event. More...
 
struct  mpsl_tx_power_split_t
 Represents components of tx_power to be applied for stages on transmit path. More...
 
struct  mpsl_fem_caps_t
 Structure representing capabilities and characteristics of the FEM in use. More...
 

Macros

#define MPSL_FEM_CAPS_FLAG_PA_SETUP_REQUIRED   (1U << 0)
 PA setup is required before starting a transmission.
 
#define MPSL_FEM_CAPS_FLAG_LNA_SETUP_REQUIRED   (1U << 1)
 LNA setup is required before starting a reception.
 

Typedefs

typedef uint8_t mpsl_subscribable_hw_event_t
 Type representing a multiple-subscribable hardware event.
 

Enumerations

enum  mpsl_fem_functionality_t { MPSL_FEM_PA = 1 << 0 , MPSL_FEM_LNA = 1 << 1 , MPSL_FEM_ALL = MPSL_FEM_PA | MPSL_FEM_LNA }
 PA and LNA functionality types. More...
 
enum  mpsl_fem_event_type_t { MPSL_FEM_EVENT_TYPE_TIMER , MPSL_FEM_EVENT_TYPE_GENERIC }
 PA and LNA activation event types. More...
 

Functions

void mpsl_fem_caps_get (mpsl_fem_caps_t *p_caps)
 Gets the capabilities of the FEM in use.
 
void mpsl_fem_enable (void)
 Enable Front End Module.
 
int32_t mpsl_fem_disable (void)
 Disable Front End Module.
 
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)
 Sets up PA using the provided events for the upcoming radio transmission.
 
int32_t mpsl_fem_pa_configuration_clear (void)
 Clears up the configuration provided by the mpsl_fem_pa_configuration_set function.
 
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)
 Sets up LNA using the provided event for the upcoming radio reception.
 
int32_t mpsl_fem_lna_configuration_clear (void)
 Clears up the configuration provided by the mpsl_fem_lna_configuration_set function.
 
void mpsl_fem_deactivate_now (mpsl_fem_functionality_t type)
 Deactivates PA/LNA with immediate effect.
 
int32_t mpsl_fem_abort_set (mpsl_subscribable_hw_event_t event, uint32_t group)
 Instruct Front End Module to disable PA and LNA as soon as possible using the group following the event.
 
int32_t mpsl_fem_abort_extend (uint32_t channel_to_add, uint32_t group)
 Adds one more PPI channel to the PPI Group prepared by the mpsl_fem_abort_set function.
 
int32_t mpsl_fem_abort_reduce (uint32_t channel_to_remove, uint32_t group)
 Removes one PPI channel from the PPI Group prepared by the mpsl_fem_abort_set function.
 
int32_t mpsl_fem_abort_clear (void)
 Clears up the configuration provided by the mpsl_fem_abort_set function.
 
void mpsl_fem_cleanup (void)
 Cleans up the configured PA/LNA hardware resources.
 
int8_t mpsl_fem_tx_power_split (const mpsl_tx_power_t power, mpsl_tx_power_split_t *const p_tx_power_split, uint16_t freq_mhz, bool tx_power_ceiling)
 Splits transmit power value into components to be applied on each stage on transmit path.
 
int32_t mpsl_fem_pa_power_control_set (mpsl_fem_pa_power_control_t pa_power_control)
 Sets the PA power control.
 
void mpsl_fem_lna_is_configured (int8_t *const p_gain)
 Returns LNA gain if the LNA signal is configured and enabled, 0 otherwise.
 
bool mpsl_fem_prepare_powerdown (NRF_TIMER_Type *p_instance, uint32_t compare_channel, uint32_t ppi_id, uint32_t event_addr)
 Prepares the Front End Module to switch to the Power Down state.
 
void mpsl_fem_utils_available_cc_channels_cache (uint8_t mask)
 Caches the CC channels to be used by FEM.