nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
fem_al.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef FEM_AL_H_
8#define FEM_AL_H_
9
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <stdint.h>
23#include <stdbool.h>
24
25#include <hal/nrf_radio.h>
26
36
41typedef uint8_t fem_tx_power_control;
42
52int fem_init(NRF_TIMER_Type *timer_instance, uint8_t compare_channel_mask);
53
62int fem_power_up(void);
63
76
89
99uint32_t fem_default_ramp_up_time_get(bool rx, nrf_radio_mode_t mode);
100
108int fem_tx_configure(uint32_t ramp_up_time);
109
117int fem_rx_configure(uint32_t ramp_up_time);
118
123
126void fem_txrx_stop(void);
127
136
144uint32_t fem_radio_tx_ramp_up_delay_get(bool fast, nrf_radio_mode_t mode);
145
153uint32_t fem_radio_rx_ramp_up_delay_get(bool fast, nrf_radio_mode_t mode);
154
171int8_t fem_tx_output_power_prepare(int8_t power, int8_t *radio_tx_power, uint16_t freq_mhz);
172
188int8_t fem_tx_output_power_check(int8_t power, uint16_t freq_mhz, bool tx_power_ceiling);
189
196static inline int8_t fem_tx_output_power_min_get(uint16_t freq_mhz)
197{
198 /* Using INT8_MIN returns the minimum supported Tx output power value. */
199 return fem_tx_output_power_check(INT8_MIN, freq_mhz, false);
200}
201
208static inline int8_t fem_tx_output_power_max_get(uint16_t freq_mhz)
209{
210 /* Using INT8_MAX returns the maximum supported Tx output power value. */
211 return fem_tx_output_power_check(INT8_MAX, freq_mhz, true);
212}
213
219
226void fem_errata_25X(nrf_radio_mode_t mode);
227
228#ifdef __cplusplus
229}
230#endif
231
236#endif /* FEM_AL_H_ */
int fem_power_down(void)
Power-down the front-end module.
uint32_t fem_radio_rx_ramp_up_delay_get(bool fast, nrf_radio_mode_t mode)
Get the radio ramp-up time in receive mode.
int8_t fem_default_tx_output_power_get(void)
Get the front-end module default Tx output power.
int8_t fem_tx_output_power_check(int8_t power, uint16_t freq_mhz, bool tx_power_ceiling)
Check a real Tx output power, for the SoC with the front-end module for given parameters.
int fem_power_up(void)
Power-up the front-end module.
int fem_txrx_configuration_clear(void)
Clear up the configuration provided by the fem_tx_configure or fem_rx_configure.
void fem_txrx_stop(void)
Stop the front-end module RX/TX mode immediately.
int fem_init(NRF_TIMER_Type *timer_instance, uint8_t compare_channel_mask)
Initialize the front-end module.
fem_antenna
The front-end module (FEM) antennas.
Definition fem_al.h:29
@ FEM_ANTENNA_1
Definition fem_al.h:31
@ FEM_ANTENNA_2
Definition fem_al.h:34
uint32_t fem_default_ramp_up_time_get(bool rx, nrf_radio_mode_t mode)
Get the default radio ramp-up time for reception or transmission with a given data rate and modulatio...
static int8_t fem_tx_output_power_max_get(uint16_t freq_mhz)
Get the maximum Tx output power for the SoC with the front-end module.
Definition fem_al.h:208
int fem_tx_power_control_set(fem_tx_power_control tx_power_control)
Configure Tx power control of the front-end module.
int8_t fem_tx_output_power_prepare(int8_t power, int8_t *radio_tx_power, uint16_t freq_mhz)
Set the front-end module Tx power control and returns output power to be set on the radio peripheral ...
uint32_t fem_radio_tx_ramp_up_delay_get(bool fast, nrf_radio_mode_t mode)
Get the radio ramp-up time in transmit mode.
static int8_t fem_tx_output_power_min_get(uint16_t freq_mhz)
Get the minimum Tx output power for the SoC with the front-end module.
Definition fem_al.h:196
int fem_rx_configure(uint32_t ramp_up_time)
Configure the front-end module to RX mode (LNA).
int fem_antenna_select(enum fem_antenna ant)
Chooses one of two physical antenna outputs.
void fem_errata_25X(nrf_radio_mode_t mode)
Apply the workaround for the Errata 254, 255, 256, 257 when appropriate.
uint8_t fem_tx_power_control
Type holding Tx power control to be applied to front-end module.
Definition fem_al.h:41
int fem_tx_configure(uint32_t ramp_up_time)
Configure the front-end module to TX mode (PA).