/***************************************************************************//** * @file * @brief PA power conversion curves used by Silicon Labs PA power conversion * functions. * @details This file contains the curves needed convert PA power levels to * dBm powers. ******************************************************************************* * # License * Copyright 2020 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib * * The licensor of this software is Silicon Laboratories Inc. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * ******************************************************************************/ #ifndef __PA_CURVES_H_ #define __PA_CURVES_H_ #ifdef __cplusplus extern "C" { #endif #define RAIL_PA_CURVES_PIECEWISE_SEGMENTS (9U) #define RAIL_PA_CURVES_MAX_POWER 150 #define RAIL_PA_CURVES_MIN_POWER -230 #define RAIL_PA_CURVES_CURVES \ { { 255, 150, 40 }, \ { 240, 4178, -397878 }, \ { 74, 847, -21445 }, \ { 37, 384, 10798 }, \ { 21, 205, 15622 }, \ { 13, 126, 14524 }, \ { 8, 76, 11942 }, \ { 5, 45, 9180 }, \ { 3, 21, 5736 } } // *INDENT-OFF* // Macro to declare the variables needed to initialize RAIL_TxPowerCurvesConfig_t for use in // RAIL_InitTxPowerCurves, assuming battery powered operation #define RAIL_DECLARE_TX_POWER_VBAT_CURVES_ALT \ static const RAIL_TxPowerCurveAlt_t RAIL_piecewiseData = { \ RAIL_PA_CURVES_MAX_POWER, \ RAIL_PA_CURVES_MIN_POWER, \ RAIL_PA_CURVES_CURVES, \ } \ // *INDENT-OFF* #define RAIL_DECLARE_TX_POWER_CURVES_CONFIG_ALT \ { \ .curves = { \ { \ .algorithm = RAIL_PA_ALGORITHM_PIECEWISE_LINEAR, \ .segments = RAIL_PA_CURVES_PIECEWISE_SEGMENTS, \ .min = RAIL_TX_POWER_LEVEL_SUBGIG_HP_MIN, \ .max = RAIL_TX_POWER_LEVEL_SUBGIG_HP_MAX, \ .conversion = { .powerCurve = &RAIL_piecewiseData }, \ }, \ } \ } // *INDENT-OFF* #ifdef __cplusplus } #endif #endif