1 /* 2 * Copyright (c) 2020 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause 5 */ 6 7 /** 8 * @file mpsl_fem_config_common.h 9 * 10 * @defgroup mpsl_fem_config_common MPSL Front End Module Common Configuration parts 11 * @ingroup mpsl_fem 12 * 13 * The MPSL Front End Module Common Configuration defines structures common for every supported Front End Module. 14 * @{ 15 */ 16 17 #ifndef MPSL_FEM_CONFIG_COMMON_H__ 18 #define MPSL_FEM_CONFIG_COMMON_H__ 19 20 #include <stdint.h> 21 #include <stdbool.h> 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /** @brief Configuration parameters for pins that enable or disable (or both) either Power Amplifier (PA) or Low Noise Amplifier (LNA). 28 */ 29 typedef struct 30 { 31 bool enable; /**< Enable toggling for this pin. */ 32 bool active_high; /**< If true, the pin will be active high. Otherwise, the pin will be active low. */ 33 uint8_t gpio_pin; /**< GPIO pin number for the pin. */ 34 uint8_t gpiote_ch_id; /**< The GPIOTE channel used for toggling this pin. */ 35 } mpsl_fem_gpiote_pin_config_t; 36 37 /** @brief Sets flag which determines whether DEVICE-CONFIG-254 shall be applied. 38 * 39 * @note This function shall be called before initialization of any protocol stack. 40 * 41 * @param[in] apply Whether the DEVICE-CONFIG-254 option shall be applied. 42 */ 43 void mpsl_fem_device_config_254_apply_set(bool apply); 44 45 /** @brief Gets flag which determines whether DEVICE-CONFIG-254 shall be applied. 46 * 47 * @retval true DEVICE-CONFIG-254 shall be applied. 48 * @retval false DEVICE-CONFIG-254 shall not be applied. 49 */ 50 bool mpsl_fem_device_config_254_apply_get(void); 51 52 #ifdef __cplusplus 53 } 54 #endif 55 56 #endif // MPSL_FEM_CONFIG_COMMON_H__ 57 58 /**@} */ 59