Fork of my MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:45:51 2017 +0000
Revision:
0:f1d3878b8dd9
Initial commit

Who changed what in which revision?

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