Fork of my original MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:43:14 2017 +0000
Revision:
0:a1734fe1ec4b
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vpcola 0:a1734fe1ec4b 1 /**
vpcola 0:a1734fe1ec4b 2 ******************************************************************************
vpcola 0:a1734fe1ec4b 3 * @file SPIRIT_Radio.h
vpcola 0:a1734fe1ec4b 4 * @author VMA division - AMS
vpcola 0:a1734fe1ec4b 5 * @version 3.2.2
vpcola 0:a1734fe1ec4b 6 * @date 08-July-2015
vpcola 0:a1734fe1ec4b 7 * @brief This file provides all the low level API to manage Analog and Digital
vpcola 0:a1734fe1ec4b 8 * radio part of SPIRIT.
vpcola 0:a1734fe1ec4b 9 * @details
vpcola 0:a1734fe1ec4b 10 *
vpcola 0:a1734fe1ec4b 11 * In order to configure the Radio main parameters, the user can
vpcola 0:a1734fe1ec4b 12 * fit <i>SRadioInit</i> structure the and call the <i>SpiritRadioInit()</i>
vpcola 0:a1734fe1ec4b 13 * function passing its pointer as an argument.
vpcola 0:a1734fe1ec4b 14 *
vpcola 0:a1734fe1ec4b 15 * <b>Example:</b>
vpcola 0:a1734fe1ec4b 16 * @code
vpcola 0:a1734fe1ec4b 17 *
vpcola 0:a1734fe1ec4b 18 * SRadioInit radioInit = {
vpcola 0:a1734fe1ec4b 19 * 0, // Xtal offset in ppm
vpcola 0:a1734fe1ec4b 20 * 433.4e6, // base frequency
vpcola 0:a1734fe1ec4b 21 * 20e3, // channel space
vpcola 0:a1734fe1ec4b 22 * 0, // channel number
vpcola 0:a1734fe1ec4b 23 * FSK, // modulation select
vpcola 0:a1734fe1ec4b 24 * 38400, // datarate
vpcola 0:a1734fe1ec4b 25 * 20e3, // frequency deviation
vpcola 0:a1734fe1ec4b 26 * 100.5e3 // channel filter bandwidth
vpcola 0:a1734fe1ec4b 27 * };
vpcola 0:a1734fe1ec4b 28 *
vpcola 0:a1734fe1ec4b 29 * ...
vpcola 0:a1734fe1ec4b 30 *
vpcola 0:a1734fe1ec4b 31 * SpiritRadioInit(&radioInit);
vpcola 0:a1734fe1ec4b 32 * @endcode
vpcola 0:a1734fe1ec4b 33 *
vpcola 0:a1734fe1ec4b 34 * Another important parameter for the radio configuration is the
vpcola 0:a1734fe1ec4b 35 * transmission power.
vpcola 0:a1734fe1ec4b 36 * The user is allowed to configure it using the function <i>SpiritRadioSetPALeveldBm()</i>
vpcola 0:a1734fe1ec4b 37 * which sets the PA LEVEL specified by the first argument to the
vpcola 0:a1734fe1ec4b 38 * power expressed in dBm by the second parameter.
vpcola 0:a1734fe1ec4b 39 *
vpcola 0:a1734fe1ec4b 40 * <b>Example:</b>
vpcola 0:a1734fe1ec4b 41 * @code
vpcola 0:a1734fe1ec4b 42 *
vpcola 0:a1734fe1ec4b 43 * SpiritRadioSetPALeveldBm(0 , 10.0);
vpcola 0:a1734fe1ec4b 44 *
vpcola 0:a1734fe1ec4b 45 * @endcode
vpcola 0:a1734fe1ec4b 46 *
vpcola 0:a1734fe1ec4b 47 *
vpcola 0:a1734fe1ec4b 48 * @note The effective power that is set can be a little different from the
vpcola 0:a1734fe1ec4b 49 * passed argument in dBm because the function performs an approximation.
vpcola 0:a1734fe1ec4b 50 *
vpcola 0:a1734fe1ec4b 51
vpcola 0:a1734fe1ec4b 52 * @attention
vpcola 0:a1734fe1ec4b 53 *
vpcola 0:a1734fe1ec4b 54 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
vpcola 0:a1734fe1ec4b 55 *
vpcola 0:a1734fe1ec4b 56 * Redistribution and use in source and binary forms, with or without modification,
vpcola 0:a1734fe1ec4b 57 * are permitted provided that the following conditions are met:
vpcola 0:a1734fe1ec4b 58 * 1. Redistributions of source code must retain the above copyright notice,
vpcola 0:a1734fe1ec4b 59 * this list of conditions and the following disclaimer.
vpcola 0:a1734fe1ec4b 60 * 2. Redistributions in binary form must reproduce the above copyright notice,
vpcola 0:a1734fe1ec4b 61 * this list of conditions and the following disclaimer in the documentation
vpcola 0:a1734fe1ec4b 62 * and/or other materials provided with the distribution.
vpcola 0:a1734fe1ec4b 63 * 3. Neither the name of STMicroelectronics nor the names of its contributors
vpcola 0:a1734fe1ec4b 64 * may be used to endorse or promote products derived from this software
vpcola 0:a1734fe1ec4b 65 * without specific prior written permission.
vpcola 0:a1734fe1ec4b 66 *
vpcola 0:a1734fe1ec4b 67 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
vpcola 0:a1734fe1ec4b 68 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
vpcola 0:a1734fe1ec4b 69 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
vpcola 0:a1734fe1ec4b 70 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
vpcola 0:a1734fe1ec4b 71 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
vpcola 0:a1734fe1ec4b 72 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
vpcola 0:a1734fe1ec4b 73 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
vpcola 0:a1734fe1ec4b 74 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
vpcola 0:a1734fe1ec4b 75 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
vpcola 0:a1734fe1ec4b 76 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vpcola 0:a1734fe1ec4b 77 *
vpcola 0:a1734fe1ec4b 78 ******************************************************************************
vpcola 0:a1734fe1ec4b 79 */
vpcola 0:a1734fe1ec4b 80
vpcola 0:a1734fe1ec4b 81 /* Define to prevent recursive inclusion -------------------------------------*/
vpcola 0:a1734fe1ec4b 82 #ifndef __SPIRIT_RADIO_H
vpcola 0:a1734fe1ec4b 83 #define __SPIRIT_RADIO_H
vpcola 0:a1734fe1ec4b 84
vpcola 0:a1734fe1ec4b 85
vpcola 0:a1734fe1ec4b 86 /* Includes ------------------------------------------------------------------*/
vpcola 0:a1734fe1ec4b 87
vpcola 0:a1734fe1ec4b 88 #include "SPIRIT_Regs.h"
vpcola 0:a1734fe1ec4b 89 #include "SPIRIT_Types.h"
vpcola 0:a1734fe1ec4b 90 #include "SPIRIT_Config.h"
vpcola 0:a1734fe1ec4b 91
vpcola 0:a1734fe1ec4b 92
vpcola 0:a1734fe1ec4b 93 #ifdef __cplusplus
vpcola 0:a1734fe1ec4b 94 extern "C" {
vpcola 0:a1734fe1ec4b 95 #endif
vpcola 0:a1734fe1ec4b 96
vpcola 0:a1734fe1ec4b 97
vpcola 0:a1734fe1ec4b 98 /** @addtogroup SPIRIT_Libraries
vpcola 0:a1734fe1ec4b 99 * @{
vpcola 0:a1734fe1ec4b 100 */
vpcola 0:a1734fe1ec4b 101
vpcola 0:a1734fe1ec4b 102
vpcola 0:a1734fe1ec4b 103 /** @defgroup SPIRIT_Radio Radio
vpcola 0:a1734fe1ec4b 104 * @brief Configuration and management of SPIRIT RF Analog and Digital part.
vpcola 0:a1734fe1ec4b 105 * @details See the file <i>@ref SPIRIT_Radio.h</i> for more details.
vpcola 0:a1734fe1ec4b 106 * @{
vpcola 0:a1734fe1ec4b 107 */
vpcola 0:a1734fe1ec4b 108
vpcola 0:a1734fe1ec4b 109
vpcola 0:a1734fe1ec4b 110
vpcola 0:a1734fe1ec4b 111 /** @defgroup Radio_Exported_Types Radio Exported Types
vpcola 0:a1734fe1ec4b 112 * @{
vpcola 0:a1734fe1ec4b 113 */
vpcola 0:a1734fe1ec4b 114
vpcola 0:a1734fe1ec4b 115
vpcola 0:a1734fe1ec4b 116 /**
vpcola 0:a1734fe1ec4b 117 * @brief SPIRIT XTAL frequency enumeration
vpcola 0:a1734fe1ec4b 118 */
vpcola 0:a1734fe1ec4b 119 typedef enum
vpcola 0:a1734fe1ec4b 120 {
vpcola 0:a1734fe1ec4b 121 XTAL_FLAG_24_MHz = 0x00, /*!< 24 MHz Xtal selected */
vpcola 0:a1734fe1ec4b 122 XTAL_FLAG_26_MHz = 0x01 /*!< 26 MHz Xtal selected */
vpcola 0:a1734fe1ec4b 123
vpcola 0:a1734fe1ec4b 124 }XtalFlag;
vpcola 0:a1734fe1ec4b 125
vpcola 0:a1734fe1ec4b 126
vpcola 0:a1734fe1ec4b 127 #define IS_XTAL_FLAG(FLAG) (((FLAG) == XTAL_FLAG_24_MHz) || \
vpcola 0:a1734fe1ec4b 128 ((FLAG) == XTAL_FLAG_26_MHz))
vpcola 0:a1734fe1ec4b 129
vpcola 0:a1734fe1ec4b 130 /**
vpcola 0:a1734fe1ec4b 131 * @brief SPIRIT Band enumeration
vpcola 0:a1734fe1ec4b 132 */
vpcola 0:a1734fe1ec4b 133 typedef enum
vpcola 0:a1734fe1ec4b 134 {
vpcola 0:a1734fe1ec4b 135 HIGH_BAND = 0x00, /*!< High_Band selected: from 779 MHz to 915 MHz */
vpcola 0:a1734fe1ec4b 136 MIDDLE_BAND = 0x01, /*!< Middle Band selected: from 387 MHz to 470 MHz */
vpcola 0:a1734fe1ec4b 137 LOW_BAND = 0x02, /*!< Low Band selected: from 300 MHz to 348 MHz */
vpcola 0:a1734fe1ec4b 138 VERY_LOW_BAND = 0x03 /*!< Vary low Band selected: from 150 MHz to 174 MHz */
vpcola 0:a1734fe1ec4b 139 }BandSelect;
vpcola 0:a1734fe1ec4b 140
vpcola 0:a1734fe1ec4b 141
vpcola 0:a1734fe1ec4b 142 #define IS_BAND_SELECTED(BAND) ((BAND == HIGH_BAND) || \
vpcola 0:a1734fe1ec4b 143 (BAND == MIDDLE_BAND) || \
vpcola 0:a1734fe1ec4b 144 (BAND == LOW_BAND) || \
vpcola 0:a1734fe1ec4b 145 (BAND == VERY_LOW_BAND))
vpcola 0:a1734fe1ec4b 146
vpcola 0:a1734fe1ec4b 147 /**
vpcola 0:a1734fe1ec4b 148 * @brief SPIRIT Modulation enumeration
vpcola 0:a1734fe1ec4b 149 */
vpcola 0:a1734fe1ec4b 150 typedef enum
vpcola 0:a1734fe1ec4b 151 {
vpcola 0:a1734fe1ec4b 152 FSK = 0x00, /*!< 2-FSK modulation selected */
vpcola 0:a1734fe1ec4b 153 GFSK_BT05 = 0x50, /*!< GFSK modulation selected with BT=0.5 */
vpcola 0:a1734fe1ec4b 154 GFSK_BT1 = 0x10, /*!< GFSK modulation selected with BT=1 */
vpcola 0:a1734fe1ec4b 155 ASK_OOK = 0x20, /*!< ASK or OOK modulation selected. ASK will use power ramping */
vpcola 0:a1734fe1ec4b 156 MSK = 0x30 /*!< MSK modulation selected */
vpcola 0:a1734fe1ec4b 157
vpcola 0:a1734fe1ec4b 158 }ModulationSelect;
vpcola 0:a1734fe1ec4b 159
vpcola 0:a1734fe1ec4b 160
vpcola 0:a1734fe1ec4b 161 #define IS_MODULATION_SELECTED(MOD) (((MOD) == FSK) || \
vpcola 0:a1734fe1ec4b 162 ((MOD) == GFSK_BT05) || \
vpcola 0:a1734fe1ec4b 163 ((MOD) == GFSK_BT1) || \
vpcola 0:a1734fe1ec4b 164 ((MOD) == ASK_OOK) || \
vpcola 0:a1734fe1ec4b 165 ((MOD) == MSK))
vpcola 0:a1734fe1ec4b 166
vpcola 0:a1734fe1ec4b 167
vpcola 0:a1734fe1ec4b 168 /**
vpcola 0:a1734fe1ec4b 169 * @brief SPIRIT PA additional load capacitors bank enumeration
vpcola 0:a1734fe1ec4b 170 */
vpcola 0:a1734fe1ec4b 171 typedef enum
vpcola 0:a1734fe1ec4b 172 {
vpcola 0:a1734fe1ec4b 173 LOAD_0_PF = PA_POWER0_CWC_0, /*!< No additional PA load capacitor */
vpcola 0:a1734fe1ec4b 174 LOAD_1_2_PF = PA_POWER0_CWC_1_2P, /*!< 1.2pF additional PA load capacitor */
vpcola 0:a1734fe1ec4b 175 LOAD_2_4_PF = PA_POWER0_CWC_2_4P, /*!< 2.4pF additional PA load capacitor */
vpcola 0:a1734fe1ec4b 176 LOAD_3_6_PF = PA_POWER0_CWC_3_6P /*!< 3.6pF additional PA load capacitor */
vpcola 0:a1734fe1ec4b 177
vpcola 0:a1734fe1ec4b 178 }PALoadCapacitor;
vpcola 0:a1734fe1ec4b 179
vpcola 0:a1734fe1ec4b 180 #define IS_PA_LOAD_CAP(CWC) (((CWC) == LOAD_0_PF) || \
vpcola 0:a1734fe1ec4b 181 ((CWC) == LOAD_1_2_PF) || \
vpcola 0:a1734fe1ec4b 182 ((CWC) == LOAD_2_4_PF) || \
vpcola 0:a1734fe1ec4b 183 ((CWC) == LOAD_3_6_PF))
vpcola 0:a1734fe1ec4b 184
vpcola 0:a1734fe1ec4b 185
vpcola 0:a1734fe1ec4b 186 /**
vpcola 0:a1734fe1ec4b 187 * @brief SPIRIT AFC Mode selection
vpcola 0:a1734fe1ec4b 188 */
vpcola 0:a1734fe1ec4b 189 typedef enum
vpcola 0:a1734fe1ec4b 190 {
vpcola 0:a1734fe1ec4b 191 AFC_SLICER_CORRECTION = AFC2_AFC_MODE_SLICER, /*!< AFC loop closed on slicer */
vpcola 0:a1734fe1ec4b 192 AFC_2ND_IF_CORRECTION = AFC2_AFC_MODE_MIXER /*!< AFC loop closed on 2nd conversion stage */
vpcola 0:a1734fe1ec4b 193
vpcola 0:a1734fe1ec4b 194 }AFCMode;
vpcola 0:a1734fe1ec4b 195
vpcola 0:a1734fe1ec4b 196 #define IS_AFC_MODE(MODE) ((MODE) == AFC_SLICER_CORRECTION || (MODE) == AFC_2ND_IF_CORRECTION)
vpcola 0:a1734fe1ec4b 197
vpcola 0:a1734fe1ec4b 198
vpcola 0:a1734fe1ec4b 199 /**
vpcola 0:a1734fe1ec4b 200 * @brief SPIRIT AGC Mode selection
vpcola 0:a1734fe1ec4b 201 */
vpcola 0:a1734fe1ec4b 202 typedef enum
vpcola 0:a1734fe1ec4b 203 {
vpcola 0:a1734fe1ec4b 204 AGC_LINEAR_MODE = AGCCTRL0_AGC_MODE_LINEAR, /*!< AGC works in linear mode */
vpcola 0:a1734fe1ec4b 205 AGC_BINARY_MODE = AGCCTRL0_AGC_MODE_BINARY /*!< AGC works in binary mode */
vpcola 0:a1734fe1ec4b 206
vpcola 0:a1734fe1ec4b 207 }AGCMode;
vpcola 0:a1734fe1ec4b 208
vpcola 0:a1734fe1ec4b 209 #define IS_AGC_MODE(MODE) ((MODE) == AGC_LINEAR_MODE || (MODE) == AGC_BINARY_MODE)
vpcola 0:a1734fe1ec4b 210
vpcola 0:a1734fe1ec4b 211
vpcola 0:a1734fe1ec4b 212 /**
vpcola 0:a1734fe1ec4b 213 * @brief SPIRIT Clock Recovery Mode selection
vpcola 0:a1734fe1ec4b 214 */
vpcola 0:a1734fe1ec4b 215 typedef enum
vpcola 0:a1734fe1ec4b 216 {
vpcola 0:a1734fe1ec4b 217 CLK_REC_PLL = FDEV0_CLOCK_REG_ALGO_SEL_PLL, /*!< PLL alogrithm for clock recovery */
vpcola 0:a1734fe1ec4b 218 CLK_REC_DLL = FDEV0_CLOCK_REG_ALGO_SEL_DLL /*!< DLL alogrithm for clock recovery */
vpcola 0:a1734fe1ec4b 219
vpcola 0:a1734fe1ec4b 220 }ClkRecMode;
vpcola 0:a1734fe1ec4b 221
vpcola 0:a1734fe1ec4b 222 #define IS_CLK_REC_MODE(MODE) ((MODE) == CLK_REC_PLL || (MODE) == CLK_REC_DLL)
vpcola 0:a1734fe1ec4b 223
vpcola 0:a1734fe1ec4b 224
vpcola 0:a1734fe1ec4b 225 /**
vpcola 0:a1734fe1ec4b 226 * @brief SPIRIT Postfilter length
vpcola 0:a1734fe1ec4b 227 */
vpcola 0:a1734fe1ec4b 228 typedef enum
vpcola 0:a1734fe1ec4b 229 {
vpcola 0:a1734fe1ec4b 230 PSTFLT_LENGTH_8 = 0x00, /*!< Postfilter length is 8 symbols */
vpcola 0:a1734fe1ec4b 231 PSTFLT_LENGTH_16 = 0x10 /*!< Postfilter length is 16 symbols */
vpcola 0:a1734fe1ec4b 232
vpcola 0:a1734fe1ec4b 233 }PstFltLength;
vpcola 0:a1734fe1ec4b 234
vpcola 0:a1734fe1ec4b 235 #define IS_PST_FLT_LENGTH(LENGTH) ((LENGTH) == PSTFLT_LENGTH_8 || (LENGTH) == PSTFLT_LENGTH_16)
vpcola 0:a1734fe1ec4b 236
vpcola 0:a1734fe1ec4b 237
vpcola 0:a1734fe1ec4b 238 /**
vpcola 0:a1734fe1ec4b 239 * @brief SPIRIT OOK Peak Decay
vpcola 0:a1734fe1ec4b 240 */
vpcola 0:a1734fe1ec4b 241 typedef enum
vpcola 0:a1734fe1ec4b 242 {
vpcola 0:a1734fe1ec4b 243 FAST_DECAY = 0x00, /*!< Peak decay control for OOK: fast decay */
vpcola 0:a1734fe1ec4b 244 MEDIUM_FAST_DECAY = 0x01, /*!< Peak decay control for OOK: medium_fast decay */
vpcola 0:a1734fe1ec4b 245 MEDIUM_SLOW_DECAY = 0x02, /*!< Peak decay control for OOK: medium_fast decay */
vpcola 0:a1734fe1ec4b 246 SLOW_DECAY = 0x03 /*!< Peak decay control for OOK: slow decay */
vpcola 0:a1734fe1ec4b 247
vpcola 0:a1734fe1ec4b 248 }OokPeakDecay;
vpcola 0:a1734fe1ec4b 249
vpcola 0:a1734fe1ec4b 250 #define IS_OOK_PEAK_DECAY(DECAY) (((DECAY) == FAST_DECAY) ||\
vpcola 0:a1734fe1ec4b 251 ((DECAY) == MEDIUM_FAST_DECAY) ||\
vpcola 0:a1734fe1ec4b 252 ((DECAY) == MEDIUM_SLOW_DECAY) ||\
vpcola 0:a1734fe1ec4b 253 ((DECAY) == SLOW_DECAY))
vpcola 0:a1734fe1ec4b 254
vpcola 0:a1734fe1ec4b 255
vpcola 0:a1734fe1ec4b 256 /**
vpcola 0:a1734fe1ec4b 257 * @brief SPIRIT Radio Init structure definition
vpcola 0:a1734fe1ec4b 258 */
vpcola 0:a1734fe1ec4b 259 typedef struct
vpcola 0:a1734fe1ec4b 260 {
vpcola 0:a1734fe1ec4b 261 int16_t nXtalOffsetPpm; /*!< Specifies the offset frequency (in ppm)
vpcola 0:a1734fe1ec4b 262 to compensate crystal inaccuracy expressed
vpcola 0:a1734fe1ec4b 263 as signed value.*/
vpcola 0:a1734fe1ec4b 264
vpcola 0:a1734fe1ec4b 265 uint32_t lFrequencyBase; /*!< Specifies the base carrier frequency (in Hz),
vpcola 0:a1734fe1ec4b 266 i.e. the carrier frequency of channel #0.
vpcola 0:a1734fe1ec4b 267 This parameter can be in one of the following ranges:
vpcola 0:a1734fe1ec4b 268 High_Band: from 779 MHz to 915 MHz
vpcola 0:a1734fe1ec4b 269 Middle Band: from 387 MHz to 470 MHz
vpcola 0:a1734fe1ec4b 270 Low Band: from 300 MHz to 348 MHz */
vpcola 0:a1734fe1ec4b 271 uint32_t nChannelSpace; /*!< Specifies the channel spacing expressed in Hz.
vpcola 0:a1734fe1ec4b 272 The channel spacing is expressed as:
vpcola 0:a1734fe1ec4b 273 NxFREQUENCY_STEPS, where FREQUENCY STEPS
vpcola 0:a1734fe1ec4b 274 is F_Xo/2^15.
vpcola 0:a1734fe1ec4b 275 This parameter can be in the range: [0, F_Xo/2^15*255] Hz */
vpcola 0:a1734fe1ec4b 276 uint8_t cChannelNumber; /*!< Specifies the channel number. This value
vpcola 0:a1734fe1ec4b 277 is multiplied by the channel spacing and
vpcola 0:a1734fe1ec4b 278 added to synthesizer base frequency to
vpcola 0:a1734fe1ec4b 279 generate the actual RF carrier frequency */
vpcola 0:a1734fe1ec4b 280 ModulationSelect xModulationSelect; /*!< Specifies the modulation. This
vpcola 0:a1734fe1ec4b 281 parameter can be any value of
vpcola 0:a1734fe1ec4b 282 @ref ModulationSelect */
vpcola 0:a1734fe1ec4b 283 uint32_t lDatarate; /*!< Specifies the datarate expressed in bps.
vpcola 0:a1734fe1ec4b 284 This parameter can be in the range between
vpcola 0:a1734fe1ec4b 285 100 bps and 500 kbps */
vpcola 0:a1734fe1ec4b 286 uint32_t lFreqDev; /*!< Specifies the frequency deviation expressed in Hz.
vpcola 0:a1734fe1ec4b 287 This parameter can be in the range: [F_Xo*8/2^18, F_Xo*7680/2^18] Hz */
vpcola 0:a1734fe1ec4b 288 uint32_t lBandwidth; /*!< Specifies the channel filter bandwidth
vpcola 0:a1734fe1ec4b 289 expressed in Hz. This parameter can be
vpcola 0:a1734fe1ec4b 290 in the range between 1100 and 800100 Hz */
vpcola 0:a1734fe1ec4b 291
vpcola 0:a1734fe1ec4b 292 }SRadioInit;
vpcola 0:a1734fe1ec4b 293
vpcola 0:a1734fe1ec4b 294 /**
vpcola 0:a1734fe1ec4b 295 * @}
vpcola 0:a1734fe1ec4b 296 */
vpcola 0:a1734fe1ec4b 297
vpcola 0:a1734fe1ec4b 298
vpcola 0:a1734fe1ec4b 299
vpcola 0:a1734fe1ec4b 300 /** @defgroup Radio_Exported_Constants Radio Exported Constants
vpcola 0:a1734fe1ec4b 301 * @{
vpcola 0:a1734fe1ec4b 302 */
vpcola 0:a1734fe1ec4b 303
vpcola 0:a1734fe1ec4b 304 /** @defgroup Radio_Band
vpcola 0:a1734fe1ec4b 305 * @{
vpcola 0:a1734fe1ec4b 306 */
vpcola 0:a1734fe1ec4b 307
vpcola 0:a1734fe1ec4b 308 #define FBASE_DIVIDER 262144 /*!< 2^18 factor dividing fxo in fbase formula */
vpcola 0:a1734fe1ec4b 309
vpcola 0:a1734fe1ec4b 310 #define HIGH_BAND_FACTOR 6 /*!< Band select factor for high band. Factor B in the equation 2 */
vpcola 0:a1734fe1ec4b 311 #define MIDDLE_BAND_FACTOR 12 /*!< Band select factor for middle band. Factor B in the equation 2 */
vpcola 0:a1734fe1ec4b 312 #define LOW_BAND_FACTOR 16 /*!< Band select factor for low band. Factor B in the equation 2 */
vpcola 0:a1734fe1ec4b 313 #define VERY_LOW_BAND_FACTOR 32 /*!< Band select factor for very low band. Factor B in the equation 2 */
vpcola 0:a1734fe1ec4b 314
vpcola 0:a1734fe1ec4b 315 #define HIGH_BAND_LOWER_LIMIT 778000000 /*!< Lower limit of the high band: 779 MHz */
vpcola 0:a1734fe1ec4b 316 #define HIGH_BAND_UPPER_LIMIT 957100000 /*!< Upper limit of the high band: 956 MHz */
vpcola 0:a1734fe1ec4b 317 #define MIDDLE_BAND_LOWER_LIMIT 386000000 /*!< Lower limit of the middle band: 387 MHz */
vpcola 0:a1734fe1ec4b 318 #define MIDDLE_BAND_UPPER_LIMIT 471100000 /*!< Upper limit of the middle band: 470 MHz */
vpcola 0:a1734fe1ec4b 319 #define LOW_BAND_LOWER_LIMIT 299000000 /*!< Lower limit of the low band: 300 MHz */
vpcola 0:a1734fe1ec4b 320 #define LOW_BAND_UPPER_LIMIT 349100000 /*!< Upper limit of the low band: 348 MHz */
vpcola 0:a1734fe1ec4b 321 #define VERY_LOW_BAND_LOWER_LIMIT 149000000 /*!< Lower limit of the very low band: 150 MHz */
vpcola 0:a1734fe1ec4b 322 #define VERY_LOW_BAND_UPPER_LIMIT 175100000 /*!< Upper limit of the very low band: 174 MHz */
vpcola 0:a1734fe1ec4b 323
vpcola 0:a1734fe1ec4b 324 #define IS_FREQUENCY_BAND_HIGH(FREQUENCY) ((FREQUENCY)>=HIGH_BAND_LOWER_LIMIT && \
vpcola 0:a1734fe1ec4b 325 (FREQUENCY)<=HIGH_BAND_UPPER_LIMIT)
vpcola 0:a1734fe1ec4b 326
vpcola 0:a1734fe1ec4b 327 #define IS_FREQUENCY_BAND_MIDDLE(FREQUENCY) ((FREQUENCY)>=MIDDLE_BAND_LOWER_LIMIT && \
vpcola 0:a1734fe1ec4b 328 (FREQUENCY)<=MIDDLE_BAND_UPPER_LIMIT)
vpcola 0:a1734fe1ec4b 329
vpcola 0:a1734fe1ec4b 330 #define IS_FREQUENCY_BAND_LOW(FREQUENCY) ((FREQUENCY)>=LOW_BAND_LOWER_LIMIT && \
vpcola 0:a1734fe1ec4b 331 (FREQUENCY)<=LOW_BAND_UPPER_LIMIT)
vpcola 0:a1734fe1ec4b 332
vpcola 0:a1734fe1ec4b 333 #define IS_FREQUENCY_BAND_VERY_LOW(FREQUENCY) ((FREQUENCY)>=VERY_LOW_BAND_LOWER_LIMIT && \
vpcola 0:a1734fe1ec4b 334 (FREQUENCY)<=VERY_LOW_BAND_UPPER_LIMIT)
vpcola 0:a1734fe1ec4b 335
vpcola 0:a1734fe1ec4b 336 #define IS_FREQUENCY_BAND(FREQUENCY) (IS_FREQUENCY_BAND_HIGH(FREQUENCY)|| \
vpcola 0:a1734fe1ec4b 337 IS_FREQUENCY_BAND_MIDDLE(FREQUENCY)|| \
vpcola 0:a1734fe1ec4b 338 IS_FREQUENCY_BAND_LOW(FREQUENCY)|| \
vpcola 0:a1734fe1ec4b 339 IS_FREQUENCY_BAND_VERY_LOW(FREQUENCY))
vpcola 0:a1734fe1ec4b 340
vpcola 0:a1734fe1ec4b 341 /**
vpcola 0:a1734fe1ec4b 342 * @}
vpcola 0:a1734fe1ec4b 343 */
vpcola 0:a1734fe1ec4b 344
vpcola 0:a1734fe1ec4b 345
vpcola 0:a1734fe1ec4b 346 /** @defgroup Radio_IF_Offset Radio IF Offset
vpcola 0:a1734fe1ec4b 347 * @{
vpcola 0:a1734fe1ec4b 348 */
vpcola 0:a1734fe1ec4b 349 #define IF_OFFSET_ANA(F_Xo) (lroundf(480140.0/(F_Xo)*12288-64.0)) /*!< It represents the IF_OFFSET_ANA in order
vpcola 0:a1734fe1ec4b 350 to have an intermediate frequency of 480 kHz */
vpcola 0:a1734fe1ec4b 351 /**
vpcola 0:a1734fe1ec4b 352 * @}
vpcola 0:a1734fe1ec4b 353 */
vpcola 0:a1734fe1ec4b 354
vpcola 0:a1734fe1ec4b 355
vpcola 0:a1734fe1ec4b 356 /** @defgroup Radio_FC_Offset Radio FC Offset
vpcola 0:a1734fe1ec4b 357 * @{
vpcola 0:a1734fe1ec4b 358 */
vpcola 0:a1734fe1ec4b 359 #define F_OFFSET_DIVIDER 262144 /*!< 2^18 factor dividing fxo in foffset formula */
vpcola 0:a1734fe1ec4b 360 #define PPM_FACTOR 1000000 /*!< 10^6 factor to use with Xtal_offset_ppm */
vpcola 0:a1734fe1ec4b 361
vpcola 0:a1734fe1ec4b 362
vpcola 0:a1734fe1ec4b 363 #define F_OFFSET_LOWER_LIMIT(F_Xo) ((-(int32_t)F_Xo)/F_OFFSET_DIVIDER*2048)
vpcola 0:a1734fe1ec4b 364 #define F_OFFSET_UPPER_LIMIT(F_Xo) ((int32_t)(F_Xo/F_OFFSET_DIVIDER*2047))
vpcola 0:a1734fe1ec4b 365
vpcola 0:a1734fe1ec4b 366 #define IS_FREQUENCY_OFFSET(OFFSET, F_Xo) (OFFSET>=F_OFFSET_LOWER_LIMIT(F_Xo) && OFFSET<=F_OFFSET_UPPER_LIMIT(F_Xo))
vpcola 0:a1734fe1ec4b 367
vpcola 0:a1734fe1ec4b 368
vpcola 0:a1734fe1ec4b 369 /**
vpcola 0:a1734fe1ec4b 370 * @}
vpcola 0:a1734fe1ec4b 371 */
vpcola 0:a1734fe1ec4b 372
vpcola 0:a1734fe1ec4b 373
vpcola 0:a1734fe1ec4b 374 /** @defgroup Radio_Channel_Space Radio Channel Space
vpcola 0:a1734fe1ec4b 375 * @{
vpcola 0:a1734fe1ec4b 376 */
vpcola 0:a1734fe1ec4b 377
vpcola 0:a1734fe1ec4b 378
vpcola 0:a1734fe1ec4b 379 #define CHSPACE_DIVIDER 32768 /*!< 2^15 factor dividing fxo in channel space formula */
vpcola 0:a1734fe1ec4b 380
vpcola 0:a1734fe1ec4b 381 #define IS_CHANNEL_SPACE(CHANNELSPACE, F_Xo) (CHANNELSPACE<=(F_Xo/32768*255))
vpcola 0:a1734fe1ec4b 382
vpcola 0:a1734fe1ec4b 383
vpcola 0:a1734fe1ec4b 384
vpcola 0:a1734fe1ec4b 385
vpcola 0:a1734fe1ec4b 386
vpcola 0:a1734fe1ec4b 387 /**
vpcola 0:a1734fe1ec4b 388 * @}
vpcola 0:a1734fe1ec4b 389 */
vpcola 0:a1734fe1ec4b 390
vpcola 0:a1734fe1ec4b 391
vpcola 0:a1734fe1ec4b 392 /** @defgroup Radio_Datarate Radio Datarate
vpcola 0:a1734fe1ec4b 393 * @{
vpcola 0:a1734fe1ec4b 394 */
vpcola 0:a1734fe1ec4b 395 #define MINIMUM_DATARATE 100 /*!< Minimum datarate supported by SPIRIT1 100 bps */
vpcola 0:a1734fe1ec4b 396 #define MAXIMUM_DATARATE 510000 /*!< Maximum datarate supported by SPIRIT1 500 kbps */
vpcola 0:a1734fe1ec4b 397
vpcola 0:a1734fe1ec4b 398 #define IS_DATARATE(DATARATE) (DATARATE>=MINIMUM_DATARATE && DATARATE<=MAXIMUM_DATARATE)
vpcola 0:a1734fe1ec4b 399
vpcola 0:a1734fe1ec4b 400 /**
vpcola 0:a1734fe1ec4b 401 * @}
vpcola 0:a1734fe1ec4b 402 */
vpcola 0:a1734fe1ec4b 403
vpcola 0:a1734fe1ec4b 404
vpcola 0:a1734fe1ec4b 405 /** @defgroup Radio_Frequency_Deviation Radio Frequency Deviation
vpcola 0:a1734fe1ec4b 406 * @{
vpcola 0:a1734fe1ec4b 407 */
vpcola 0:a1734fe1ec4b 408 #define F_DEV_MANTISSA_UPPER_LIMIT 7 /*!< Maximum value for the mantissa in frequency deviation formula */
vpcola 0:a1734fe1ec4b 409 #define F_DEV_EXPONENT_UPPER_LIMIT 9 /*!< Maximum value for the exponent in frequency deviation formula */
vpcola 0:a1734fe1ec4b 410
vpcola 0:a1734fe1ec4b 411 #define F_DEV_LOWER_LIMIT(F_Xo) (F_Xo>>16)
vpcola 0:a1734fe1ec4b 412 #define F_DEV_UPPER_LIMIT(F_Xo) ((F_Xo*15)>>10)
vpcola 0:a1734fe1ec4b 413
vpcola 0:a1734fe1ec4b 414 #define IS_F_DEV(FDEV,F_Xo) (FDEV>=F_DEV_LOWER_LIMIT(F_Xo) && FDEV<=F_DEV_UPPER_LIMIT(F_Xo))
vpcola 0:a1734fe1ec4b 415
vpcola 0:a1734fe1ec4b 416
vpcola 0:a1734fe1ec4b 417 /**
vpcola 0:a1734fe1ec4b 418 * @}
vpcola 0:a1734fe1ec4b 419 */
vpcola 0:a1734fe1ec4b 420
vpcola 0:a1734fe1ec4b 421
vpcola 0:a1734fe1ec4b 422 /** @defgroup Radio_Channel_Bandwidth Radio Channel Bandwidth
vpcola 0:a1734fe1ec4b 423 * @{
vpcola 0:a1734fe1ec4b 424 */
vpcola 0:a1734fe1ec4b 425 #define CH_BW_LOWER_LIMIT(F_Xo) 1100*(F_Xo/1000000)/26 /*!< Minimum value of the channel filter bandwidth */
vpcola 0:a1734fe1ec4b 426 #define CH_BW_UPPER_LIMIT(F_Xo) 800100*(F_Xo/1000000)/26 /*!< Maximum value of the channel filter bandwidth */
vpcola 0:a1734fe1ec4b 427
vpcola 0:a1734fe1ec4b 428 #define IS_CH_BW(BW,F_Xo) ((BW)>=CH_BW_LOWER_LIMIT(F_Xo) && (BW)<=CH_BW_UPPER_LIMIT(F_Xo))
vpcola 0:a1734fe1ec4b 429
vpcola 0:a1734fe1ec4b 430 /**
vpcola 0:a1734fe1ec4b 431 * @}
vpcola 0:a1734fe1ec4b 432 */
vpcola 0:a1734fe1ec4b 433
vpcola 0:a1734fe1ec4b 434
vpcola 0:a1734fe1ec4b 435 /** @defgroup Radio_Power_Amplifier Radio Power Amplifier
vpcola 0:a1734fe1ec4b 436 * @{
vpcola 0:a1734fe1ec4b 437 */
vpcola 0:a1734fe1ec4b 438
vpcola 0:a1734fe1ec4b 439 #define IS_PA_MAX_INDEX(INDEX) ((INDEX)<=7)
vpcola 0:a1734fe1ec4b 440 #define IS_PAPOWER_DBM(PATABLE) ((PATABLE)>= (-31) && (PATABLE)<=(12))
vpcola 0:a1734fe1ec4b 441 #define IS_PAPOWER(PATABLE) ((PATABLE)<=90)
vpcola 0:a1734fe1ec4b 442 #define IS_PA_STEP_WIDTH(WIDTH) ((WIDTH)>=1 && (WIDTH)<=4)
vpcola 0:a1734fe1ec4b 443
vpcola 0:a1734fe1ec4b 444 /**
vpcola 0:a1734fe1ec4b 445 * @}
vpcola 0:a1734fe1ec4b 446 */
vpcola 0:a1734fe1ec4b 447
vpcola 0:a1734fe1ec4b 448
vpcola 0:a1734fe1ec4b 449 /** @defgroup Radio_Automatic_Frequency_Correction Radio Automatic Frequency Correction
vpcola 0:a1734fe1ec4b 450 * @{
vpcola 0:a1734fe1ec4b 451 */
vpcola 0:a1734fe1ec4b 452
vpcola 0:a1734fe1ec4b 453 #define IS_AFC_FAST_GAIN(GAIN) ((GAIN)<=15)
vpcola 0:a1734fe1ec4b 454 #define IS_AFC_SLOW_GAIN(GAIN) ((GAIN)<=15)
vpcola 0:a1734fe1ec4b 455 #define IS_AFC_PD_LEAKAGE(LEAKAGE) ((LEAKAGE)<=31)
vpcola 0:a1734fe1ec4b 456
vpcola 0:a1734fe1ec4b 457 /**
vpcola 0:a1734fe1ec4b 458 * @}
vpcola 0:a1734fe1ec4b 459 */
vpcola 0:a1734fe1ec4b 460
vpcola 0:a1734fe1ec4b 461 /** @defgroup Radio_Automatic_Gain_Control Radio Automatic Gain Control
vpcola 0:a1734fe1ec4b 462 * @{
vpcola 0:a1734fe1ec4b 463 */
vpcola 0:a1734fe1ec4b 464
vpcola 0:a1734fe1ec4b 465 #define AGC_MEASURE_TIME_UPPER_LIMIT_US(F_Xo) (393216.0/F_Xo)
vpcola 0:a1734fe1ec4b 466
vpcola 0:a1734fe1ec4b 467 #define IS_AGC_MEASURE_TIME_US(TIME, F_Xo) (TIME<=AGC_MEASURE_TIME_UPPER_LIMIT_US(F_Xo))
vpcola 0:a1734fe1ec4b 468
vpcola 0:a1734fe1ec4b 469 #define IS_AGC_MEASURE_TIME(TIME) (TIME<=15)
vpcola 0:a1734fe1ec4b 470
vpcola 0:a1734fe1ec4b 471 #define AGC_HOLD_TIME_UPPER_LIMIT_US(F_Xo) (756.0/F_Xo)
vpcola 0:a1734fe1ec4b 472
vpcola 0:a1734fe1ec4b 473 #define IS_AGC_HOLD_TIME_US(TIME,F_Xo) (TIME<=AGC_HOLD_TIME_UPPER_LIMIT_US(F_Xo))
vpcola 0:a1734fe1ec4b 474
vpcola 0:a1734fe1ec4b 475
vpcola 0:a1734fe1ec4b 476 #define IS_AGC_HOLD_TIME(TIME) (TIME<=63)
vpcola 0:a1734fe1ec4b 477
vpcola 0:a1734fe1ec4b 478 #define IS_AGC_THRESHOLD(THRESHOLD) (THRESHOLD<=15)
vpcola 0:a1734fe1ec4b 479
vpcola 0:a1734fe1ec4b 480 /**
vpcola 0:a1734fe1ec4b 481 * @}
vpcola 0:a1734fe1ec4b 482 */
vpcola 0:a1734fe1ec4b 483
vpcola 0:a1734fe1ec4b 484
vpcola 0:a1734fe1ec4b 485 /** @defgroup Radio_Clock_Recovery Radio Clock Recovery
vpcola 0:a1734fe1ec4b 486 * @{
vpcola 0:a1734fe1ec4b 487 */
vpcola 0:a1734fe1ec4b 488
vpcola 0:a1734fe1ec4b 489 #define IS_CLK_REC_P_GAIN(GAIN) ((GAIN)<=7)
vpcola 0:a1734fe1ec4b 490 #define IS_CLK_REC_I_GAIN(GAIN) ((GAIN)<=15)
vpcola 0:a1734fe1ec4b 491
vpcola 0:a1734fe1ec4b 492 /**
vpcola 0:a1734fe1ec4b 493 * @}
vpcola 0:a1734fe1ec4b 494 */
vpcola 0:a1734fe1ec4b 495
vpcola 0:a1734fe1ec4b 496 /**
vpcola 0:a1734fe1ec4b 497 * @}
vpcola 0:a1734fe1ec4b 498 */
vpcola 0:a1734fe1ec4b 499
vpcola 0:a1734fe1ec4b 500
vpcola 0:a1734fe1ec4b 501
vpcola 0:a1734fe1ec4b 502 /** @defgroup Radio_Exported_Macros Radio Exported Macros
vpcola 0:a1734fe1ec4b 503 * @{
vpcola 0:a1734fe1ec4b 504 */
vpcola 0:a1734fe1ec4b 505
vpcola 0:a1734fe1ec4b 506
vpcola 0:a1734fe1ec4b 507 /**
vpcola 0:a1734fe1ec4b 508 * @}
vpcola 0:a1734fe1ec4b 509 */
vpcola 0:a1734fe1ec4b 510
vpcola 0:a1734fe1ec4b 511 /** @defgroup Radio_Exported_Functions Radio Exported Functions
vpcola 0:a1734fe1ec4b 512 * @{
vpcola 0:a1734fe1ec4b 513 */
vpcola 0:a1734fe1ec4b 514
vpcola 0:a1734fe1ec4b 515 uint8_t SpiritRadioInit(SRadioInit* pxSRadioInitStruct);
vpcola 0:a1734fe1ec4b 516 void SpiritRadioGetInfo(SRadioInit* pxSRadioInitStruct);
vpcola 0:a1734fe1ec4b 517 void SpiritRadioSetXtalFlag(XtalFlag xXtal);
vpcola 0:a1734fe1ec4b 518 XtalFlag SpiritRadioGetXtalFlag(void);
vpcola 0:a1734fe1ec4b 519 uint8_t SpiritRadioSearchWCP(uint32_t lFc);
vpcola 0:a1734fe1ec4b 520 void SpiritRadioSetSynthWord(uint32_t lSynthWord);
vpcola 0:a1734fe1ec4b 521 uint32_t SpiritRadioGetSynthWord(void);
vpcola 0:a1734fe1ec4b 522 void SpiritRadioSetBand(BandSelect xBand);
vpcola 0:a1734fe1ec4b 523 BandSelect SpiritRadioGetBand(void);
vpcola 0:a1734fe1ec4b 524 void SpiritRadioSetChannel(uint8_t cChannel);
vpcola 0:a1734fe1ec4b 525 uint8_t SpiritRadioGetChannel(void);
vpcola 0:a1734fe1ec4b 526 void SpiritRadioSetChannelSpace(uint32_t lChannelSpace);
vpcola 0:a1734fe1ec4b 527 uint32_t SpiritRadioGetChannelSpace(void);
vpcola 0:a1734fe1ec4b 528 void SpiritRadioSetFrequencyOffsetPpm(int16_t nXtalPpm);
vpcola 0:a1734fe1ec4b 529 void SpiritRadioSetFrequencyOffset(int32_t lFOffset);
vpcola 0:a1734fe1ec4b 530 int32_t SpiritRadioGetFrequencyOffset(void);
vpcola 0:a1734fe1ec4b 531 void SpiritRadioVcoCalibrationWAFB(SpiritFunctionalState xNewstate);
vpcola 0:a1734fe1ec4b 532 uint8_t SpiritRadioSetFrequencyBase(uint32_t lFBase);
vpcola 0:a1734fe1ec4b 533 uint32_t SpiritRadioGetFrequencyBase(void);
vpcola 0:a1734fe1ec4b 534 uint32_t SpiritRadioGetCenterFrequency(void);
vpcola 0:a1734fe1ec4b 535 void SpiritRadioSearchDatarateME(uint32_t lDatarate, uint8_t* pcM, uint8_t* pcE);
vpcola 0:a1734fe1ec4b 536 void SpiritRadioSearchFreqDevME(uint32_t lFDev, uint8_t* pcM, uint8_t* pcE);
vpcola 0:a1734fe1ec4b 537 void SpiritRadioSearchChannelBwME(uint32_t lBandwidth, uint8_t* pcM, uint8_t* pcE);
vpcola 0:a1734fe1ec4b 538 void SpiritRadioSetDatarate(uint32_t lDatarate);
vpcola 0:a1734fe1ec4b 539 uint32_t SpiritRadioGetDatarate(void);
vpcola 0:a1734fe1ec4b 540 void SpiritRadioSetFrequencyDev(uint32_t lFDev);
vpcola 0:a1734fe1ec4b 541 uint32_t SpiritRadioGetFrequencyDev(void);
vpcola 0:a1734fe1ec4b 542 void SpiritRadioSetChannelBW(uint32_t lBandwidth);
vpcola 0:a1734fe1ec4b 543 uint32_t SpiritRadioGetChannelBW(void);
vpcola 0:a1734fe1ec4b 544 void SpiritRadioSetModulation(ModulationSelect xModulation);
vpcola 0:a1734fe1ec4b 545 ModulationSelect SpiritRadioGetModulation(void);
vpcola 0:a1734fe1ec4b 546 void SpiritRadioCWTransmitMode(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 547 void SpiritRadioSetOokPeakDecay(OokPeakDecay xOokDecay);
vpcola 0:a1734fe1ec4b 548 OokPeakDecay SpiritRadioGetOokPeakDecay(void);
vpcola 0:a1734fe1ec4b 549 uint8_t SpiritRadioGetdBm2Reg(uint32_t lFBase, float fPowerdBm);
vpcola 0:a1734fe1ec4b 550 float SpiritRadioGetReg2dBm(uint32_t lFBase, uint8_t cPowerReg);
vpcola 0:a1734fe1ec4b 551 void SpiritRadioSetPATabledBm(uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, float* pfPAtabledBm);
vpcola 0:a1734fe1ec4b 552 void SpiritRadioGetPATabledBm(uint8_t* pcPALevelMaxIndex, float* pfPAtabledBm);
vpcola 0:a1734fe1ec4b 553 void SpiritRadioSetPATable(uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, uint8_t* pcPAtable);
vpcola 0:a1734fe1ec4b 554 void SpiritRadioGetPATable(uint8_t* pcPALevelMaxIndex, uint8_t* pcPAtable);
vpcola 0:a1734fe1ec4b 555 void SpiritRadioSetPALeveldBm(uint8_t cIndex, float fPowerdBm);
vpcola 0:a1734fe1ec4b 556 float SpiritRadioGetPALeveldBm(uint8_t cIndex);
vpcola 0:a1734fe1ec4b 557 void SpiritRadioSetPALevel(uint8_t cIndex, uint8_t cPower);
vpcola 0:a1734fe1ec4b 558 uint8_t SpiritRadioGetPALevel(uint8_t cIndex);
vpcola 0:a1734fe1ec4b 559 void SpiritRadioSetPACwc(PALoadCapacitor xCLoad);
vpcola 0:a1734fe1ec4b 560 PALoadCapacitor SpiritRadioGetPACwc(void);
vpcola 0:a1734fe1ec4b 561 void SpiritRadioSetPALevelMaxIndex(uint8_t cIndex);
vpcola 0:a1734fe1ec4b 562 uint8_t SpiritRadioGetPALevelMaxIndex(void);
vpcola 0:a1734fe1ec4b 563 void SpiritRadioSetPAStepWidth(uint8_t cWidth);
vpcola 0:a1734fe1ec4b 564 uint8_t SpiritRadioGetPAStepWidth(void);
vpcola 0:a1734fe1ec4b 565 void SpiritRadioPARamping(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 566 SpiritFunctionalState SpiritRadioGetPARamping(void);
vpcola 0:a1734fe1ec4b 567 void SpiritRadioAFC(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 568 void SpiritRadioAFCFreezeOnSync(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 569 void SpiritRadioSetAFCMode(AFCMode xMode);
vpcola 0:a1734fe1ec4b 570 AFCMode SpiritRadioGetAFCMode(void);
vpcola 0:a1734fe1ec4b 571 void SpiritRadioSetAFCPDLeakage(uint8_t cLeakage);
vpcola 0:a1734fe1ec4b 572 uint8_t SpiritRadioGetAFCPDLeakage(void);
vpcola 0:a1734fe1ec4b 573 void SpiritRadioSetAFCFastPeriod(uint8_t cLength);
vpcola 0:a1734fe1ec4b 574 uint8_t SpiritRadioGetAFCFastPeriod(void);
vpcola 0:a1734fe1ec4b 575 void SpiritRadioSetAFCFastGain(uint8_t cGain);
vpcola 0:a1734fe1ec4b 576 uint8_t SpiritRadioGetAFCFastGain(void);
vpcola 0:a1734fe1ec4b 577 void SpiritRadioSetAFCSlowGain(uint8_t cGain);
vpcola 0:a1734fe1ec4b 578 uint8_t SpiritRadioGetAFCSlowGain(void);
vpcola 0:a1734fe1ec4b 579 int8_t SpiritRadioGetAFCCorrectionReg(void);
vpcola 0:a1734fe1ec4b 580 int32_t SpiritRadioGetAFCCorrectionHz(void);
vpcola 0:a1734fe1ec4b 581 void SpiritRadioAGC(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 582 void SpiritRadioSetAGCMode(AGCMode xMode);
vpcola 0:a1734fe1ec4b 583 AGCMode SpiritRadioGetAGCMode(void);
vpcola 0:a1734fe1ec4b 584 void SpiritRadioAGCFreezeOnSteady(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 585 void SpiritRadioAGCFreezeOnSync(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 586 void SpiritRadioAGCStartMaxAttenuation(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 587 void SpiritRadioSetAGCMeasureTimeUs(uint16_t nTime);
vpcola 0:a1734fe1ec4b 588 uint16_t SpiritRadioGetAGCMeasureTimeUs(void);
vpcola 0:a1734fe1ec4b 589 void SpiritRadioSetAGCMeasureTime(uint8_t cTime);
vpcola 0:a1734fe1ec4b 590 uint8_t SpiritRadioGetAGCMeasureTime(void);
vpcola 0:a1734fe1ec4b 591 void SpiritRadioSetAGCHoldTimeUs(uint8_t cTime);
vpcola 0:a1734fe1ec4b 592 uint8_t SpiritRadioGetAGCHoldTimeUs(void);
vpcola 0:a1734fe1ec4b 593 void SpiritRadioSetAGCHoldTime(uint8_t cTime);
vpcola 0:a1734fe1ec4b 594 uint8_t SpiritRadioGetAGCHoldTime(void);
vpcola 0:a1734fe1ec4b 595 void SpiritRadioSetAGCHighThreshold(uint8_t cHighThreshold);
vpcola 0:a1734fe1ec4b 596 uint8_t SpiritRadioGetAGCHighThreshold(void);
vpcola 0:a1734fe1ec4b 597 void SpiritRadioSetAGCLowThreshold(uint8_t cLowThreshold);
vpcola 0:a1734fe1ec4b 598 uint8_t SpiritRadioGetAGCLowThreshold(void);
vpcola 0:a1734fe1ec4b 599 void SpiritRadioSetClkRecMode(ClkRecMode xMode);
vpcola 0:a1734fe1ec4b 600 ClkRecMode SpiritRadioGetClkRecMode(void);
vpcola 0:a1734fe1ec4b 601 void SpiritRadioSetClkRecPGain(uint8_t cPGain);
vpcola 0:a1734fe1ec4b 602 uint8_t SpiritRadioGetClkRecPGain(void);
vpcola 0:a1734fe1ec4b 603 void SpiritRadioSetClkRecIGain(uint8_t cIGain);
vpcola 0:a1734fe1ec4b 604 uint8_t SpiritRadioGetClkRecIGain(void);
vpcola 0:a1734fe1ec4b 605 void SpiritRadioSetClkRecPstFltLength(PstFltLength xLength);
vpcola 0:a1734fe1ec4b 606 PstFltLength SpiritRadioGetClkRecPstFltLength(void);
vpcola 0:a1734fe1ec4b 607 void SpiritRadioCsBlanking(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 608 void SpiritRadioPersistenRx(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 609 uint32_t SpiritRadioGetXtalFrequency(void);
vpcola 0:a1734fe1ec4b 610 void SpiritRadioSetXtalFrequency(uint32_t lXtalFrequency);
vpcola 0:a1734fe1ec4b 611 void SpiritRadioSetRefDiv(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 612 SpiritFunctionalState SpiritRadioGetRefDiv(void);
vpcola 0:a1734fe1ec4b 613 void SpiritRadioSetDigDiv(SpiritFunctionalState xNewState);
vpcola 0:a1734fe1ec4b 614 SpiritFunctionalState SpiritRadioGetDigDiv(void);
vpcola 0:a1734fe1ec4b 615 /**
vpcola 0:a1734fe1ec4b 616 * @}
vpcola 0:a1734fe1ec4b 617 */
vpcola 0:a1734fe1ec4b 618
vpcola 0:a1734fe1ec4b 619 /**
vpcola 0:a1734fe1ec4b 620 * @}
vpcola 0:a1734fe1ec4b 621 */
vpcola 0:a1734fe1ec4b 622
vpcola 0:a1734fe1ec4b 623
vpcola 0:a1734fe1ec4b 624 /**
vpcola 0:a1734fe1ec4b 625 * @}
vpcola 0:a1734fe1ec4b 626 */
vpcola 0:a1734fe1ec4b 627
vpcola 0:a1734fe1ec4b 628
vpcola 0:a1734fe1ec4b 629
vpcola 0:a1734fe1ec4b 630 #ifdef __cplusplus
vpcola 0:a1734fe1ec4b 631 }
vpcola 0:a1734fe1ec4b 632 #endif
vpcola 0:a1734fe1ec4b 633
vpcola 0:a1734fe1ec4b 634 #endif
vpcola 0:a1734fe1ec4b 635
vpcola 0:a1734fe1ec4b 636 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/