Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of EV-COG-AD3029LZ by
SPIRIT_Radio.h
00001 /** 00002 ****************************************************************************** 00003 * @file SPIRIT_Radio.h 00004 * @author VMA division - AMS 00005 * @version 3.2.2 00006 * @date 08-July-2015 00007 * @brief This file provides all the low level API to manage Analog and Digital 00008 * radio part of SPIRIT. 00009 * @details 00010 * 00011 * In order to configure the Radio main parameters, the user can 00012 * fit <i>SRadioInit</i> structure the and call the <i>SpiritRadioInit()</i> 00013 * function passing its pointer as an argument. 00014 * 00015 * <b>Example:</b> 00016 * @code 00017 * 00018 * SRadioInit radioInit = { 00019 * 0, // Xtal offset in ppm 00020 * 433.4e6, // base frequency 00021 * 20e3, // channel space 00022 * 0, // channel number 00023 * FSK, // modulation select 00024 * 38400, // datarate 00025 * 20e3, // frequency deviation 00026 * 100.5e3 // channel filter bandwidth 00027 * }; 00028 * 00029 * ... 00030 * 00031 * SpiritRadioInit(&radioInit); 00032 * @endcode 00033 * 00034 * Another important parameter for the radio configuration is the 00035 * transmission power. 00036 * The user is allowed to configure it using the function <i>SpiritRadioSetPALeveldBm()</i> 00037 * which sets the PA LEVEL specified by the first argument to the 00038 * power expressed in dBm by the second parameter. 00039 * 00040 * <b>Example:</b> 00041 * @code 00042 * 00043 * SpiritRadioSetPALeveldBm(0 , 10.0); 00044 * 00045 * @endcode 00046 * 00047 * 00048 * @note The effective power that is set can be a little different from the 00049 * passed argument in dBm because the function performs an approximation. 00050 * 00051 00052 * @attention 00053 * 00054 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> 00055 * 00056 * Redistribution and use in source and binary forms, with or without modification, 00057 * are permitted provided that the following conditions are met: 00058 * 1. Redistributions of source code must retain the above copyright notice, 00059 * this list of conditions and the following disclaimer. 00060 * 2. Redistributions in binary form must reproduce the above copyright notice, 00061 * this list of conditions and the following disclaimer in the documentation 00062 * and/or other materials provided with the distribution. 00063 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00064 * may be used to endorse or promote products derived from this software 00065 * without specific prior written permission. 00066 * 00067 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00068 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00069 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00070 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00071 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00072 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00073 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00074 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00075 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00076 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00077 * 00078 ****************************************************************************** 00079 */ 00080 00081 /* Define to prevent recursive inclusion -------------------------------------*/ 00082 #ifndef __SPIRIT_RADIO_H 00083 #define __SPIRIT_RADIO_H 00084 00085 00086 /* Includes ------------------------------------------------------------------*/ 00087 00088 #include "SPIRIT_Regs.h" 00089 #include "SPIRIT_Types.h" 00090 #include "SPIRIT_Config.h" 00091 00092 00093 #ifdef __cplusplus 00094 extern "C" { 00095 #endif 00096 00097 00098 /** @addtogroup SPIRIT_Libraries 00099 * @{ 00100 */ 00101 00102 00103 /** @defgroup SPIRIT_Radio Radio 00104 * @brief Configuration and management of SPIRIT RF Analog and Digital part. 00105 * @details See the file <i>@ref SPIRIT_Radio.h</i> for more details. 00106 * @{ 00107 */ 00108 00109 00110 00111 /** @defgroup Radio_Exported_Types Radio Exported Types 00112 * @{ 00113 */ 00114 00115 00116 /** 00117 * @brief SPIRIT XTAL frequency enumeration 00118 */ 00119 typedef enum 00120 { 00121 XTAL_FLAG_24_MHz = 0x00, /*!< 24 MHz Xtal selected */ 00122 XTAL_FLAG_26_MHz = 0x01 /*!< 26 MHz Xtal selected */ 00123 00124 }XtalFlag; 00125 00126 00127 #define IS_XTAL_FLAG(FLAG) (((FLAG) == XTAL_FLAG_24_MHz) || \ 00128 ((FLAG) == XTAL_FLAG_26_MHz)) 00129 00130 /** 00131 * @brief SPIRIT Band enumeration 00132 */ 00133 typedef enum 00134 { 00135 HIGH_BAND = 0x00, /*!< High_Band selected: from 779 MHz to 915 MHz */ 00136 MIDDLE_BAND = 0x01, /*!< Middle Band selected: from 387 MHz to 470 MHz */ 00137 LOW_BAND = 0x02, /*!< Low Band selected: from 300 MHz to 348 MHz */ 00138 VERY_LOW_BAND = 0x03 /*!< Vary low Band selected: from 150 MHz to 174 MHz */ 00139 }BandSelect; 00140 00141 00142 #define IS_BAND_SELECTED(BAND) ((BAND == HIGH_BAND) || \ 00143 (BAND == MIDDLE_BAND) || \ 00144 (BAND == LOW_BAND) || \ 00145 (BAND == VERY_LOW_BAND)) 00146 00147 /** 00148 * @brief SPIRIT Modulation enumeration 00149 */ 00150 typedef enum 00151 { 00152 FSK = 0x00, /*!< 2-FSK modulation selected */ 00153 GFSK_BT05 = 0x50, /*!< GFSK modulation selected with BT=0.5 */ 00154 GFSK_BT1 = 0x10, /*!< GFSK modulation selected with BT=1 */ 00155 ASK_OOK = 0x20, /*!< ASK or OOK modulation selected. ASK will use power ramping */ 00156 MSK = 0x30 /*!< MSK modulation selected */ 00157 00158 }ModulationSelect; 00159 00160 00161 #define IS_MODULATION_SELECTED(MOD) (((MOD) == FSK) || \ 00162 ((MOD) == GFSK_BT05) || \ 00163 ((MOD) == GFSK_BT1) || \ 00164 ((MOD) == ASK_OOK) || \ 00165 ((MOD) == MSK)) 00166 00167 00168 /** 00169 * @brief SPIRIT PA additional load capacitors bank enumeration 00170 */ 00171 typedef enum 00172 { 00173 LOAD_0_PF = PA_POWER0_CWC_0, /*!< No additional PA load capacitor */ 00174 LOAD_1_2_PF = PA_POWER0_CWC_1_2P, /*!< 1.2pF additional PA load capacitor */ 00175 LOAD_2_4_PF = PA_POWER0_CWC_2_4P, /*!< 2.4pF additional PA load capacitor */ 00176 LOAD_3_6_PF = PA_POWER0_CWC_3_6P /*!< 3.6pF additional PA load capacitor */ 00177 00178 }PALoadCapacitor; 00179 00180 #define IS_PA_LOAD_CAP(CWC) (((CWC) == LOAD_0_PF) || \ 00181 ((CWC) == LOAD_1_2_PF) || \ 00182 ((CWC) == LOAD_2_4_PF) || \ 00183 ((CWC) == LOAD_3_6_PF)) 00184 00185 00186 /** 00187 * @brief SPIRIT AFC Mode selection 00188 */ 00189 typedef enum 00190 { 00191 AFC_SLICER_CORRECTION = AFC2_AFC_MODE_SLICER, /*!< AFC loop closed on slicer */ 00192 AFC_2ND_IF_CORRECTION = AFC2_AFC_MODE_MIXER /*!< AFC loop closed on 2nd conversion stage */ 00193 00194 }AFCMode; 00195 00196 #define IS_AFC_MODE(MODE) ((MODE) == AFC_SLICER_CORRECTION || (MODE) == AFC_2ND_IF_CORRECTION) 00197 00198 00199 /** 00200 * @brief SPIRIT AGC Mode selection 00201 */ 00202 typedef enum 00203 { 00204 AGC_LINEAR_MODE = AGCCTRL0_AGC_MODE_LINEAR, /*!< AGC works in linear mode */ 00205 AGC_BINARY_MODE = AGCCTRL0_AGC_MODE_BINARY /*!< AGC works in binary mode */ 00206 00207 }AGCMode; 00208 00209 #define IS_AGC_MODE(MODE) ((MODE) == AGC_LINEAR_MODE || (MODE) == AGC_BINARY_MODE) 00210 00211 00212 /** 00213 * @brief SPIRIT Clock Recovery Mode selection 00214 */ 00215 typedef enum 00216 { 00217 CLK_REC_PLL = FDEV0_CLOCK_REG_ALGO_SEL_PLL, /*!< PLL alogrithm for clock recovery */ 00218 CLK_REC_DLL = FDEV0_CLOCK_REG_ALGO_SEL_DLL /*!< DLL alogrithm for clock recovery */ 00219 00220 }ClkRecMode; 00221 00222 #define IS_CLK_REC_MODE(MODE) ((MODE) == CLK_REC_PLL || (MODE) == CLK_REC_DLL) 00223 00224 00225 /** 00226 * @brief SPIRIT Postfilter length 00227 */ 00228 typedef enum 00229 { 00230 PSTFLT_LENGTH_8 = 0x00, /*!< Postfilter length is 8 symbols */ 00231 PSTFLT_LENGTH_16 = 0x10 /*!< Postfilter length is 16 symbols */ 00232 00233 }PstFltLength; 00234 00235 #define IS_PST_FLT_LENGTH(LENGTH) ((LENGTH) == PSTFLT_LENGTH_8 || (LENGTH) == PSTFLT_LENGTH_16) 00236 00237 00238 /** 00239 * @brief SPIRIT OOK Peak Decay 00240 */ 00241 typedef enum 00242 { 00243 FAST_DECAY = 0x00, /*!< Peak decay control for OOK: fast decay */ 00244 MEDIUM_FAST_DECAY = 0x01, /*!< Peak decay control for OOK: medium_fast decay */ 00245 MEDIUM_SLOW_DECAY = 0x02, /*!< Peak decay control for OOK: medium_fast decay */ 00246 SLOW_DECAY = 0x03 /*!< Peak decay control for OOK: slow decay */ 00247 00248 }OokPeakDecay; 00249 00250 #define IS_OOK_PEAK_DECAY(DECAY) (((DECAY) == FAST_DECAY) ||\ 00251 ((DECAY) == MEDIUM_FAST_DECAY) ||\ 00252 ((DECAY) == MEDIUM_SLOW_DECAY) ||\ 00253 ((DECAY) == SLOW_DECAY)) 00254 00255 00256 /** 00257 * @brief SPIRIT Radio Init structure definition 00258 */ 00259 typedef struct 00260 { 00261 int16_t nXtalOffsetPpm; /*!< Specifies the offset frequency (in ppm) 00262 to compensate crystal inaccuracy expressed 00263 as signed value.*/ 00264 00265 uint32_t lFrequencyBase; /*!< Specifies the base carrier frequency (in Hz), 00266 i.e. the carrier frequency of channel #0. 00267 This parameter can be in one of the following ranges: 00268 High_Band: from 779 MHz to 915 MHz 00269 Middle Band: from 387 MHz to 470 MHz 00270 Low Band: from 300 MHz to 348 MHz */ 00271 uint32_t nChannelSpace; /*!< Specifies the channel spacing expressed in Hz. 00272 The channel spacing is expressed as: 00273 NxFREQUENCY_STEPS, where FREQUENCY STEPS 00274 is F_Xo/2^15. 00275 This parameter can be in the range: [0, F_Xo/2^15*255] Hz */ 00276 uint8_t cChannelNumber; /*!< Specifies the channel number. This value 00277 is multiplied by the channel spacing and 00278 added to synthesizer base frequency to 00279 generate the actual RF carrier frequency */ 00280 ModulationSelect xModulationSelect; /*!< Specifies the modulation. This 00281 parameter can be any value of 00282 @ref ModulationSelect */ 00283 uint32_t lDatarate; /*!< Specifies the datarate expressed in bps. 00284 This parameter can be in the range between 00285 100 bps and 500 kbps */ 00286 uint32_t lFreqDev; /*!< Specifies the frequency deviation expressed in Hz. 00287 This parameter can be in the range: [F_Xo*8/2^18, F_Xo*7680/2^18] Hz */ 00288 uint32_t lBandwidth; /*!< Specifies the channel filter bandwidth 00289 expressed in Hz. This parameter can be 00290 in the range between 1100 and 800100 Hz */ 00291 00292 }SRadioInit; 00293 00294 /** 00295 * @} 00296 */ 00297 00298 00299 00300 /** @defgroup Radio_Exported_Constants Radio Exported Constants 00301 * @{ 00302 */ 00303 00304 /** @defgroup Radio_Band 00305 * @{ 00306 */ 00307 00308 #define FBASE_DIVIDER 262144 /*!< 2^18 factor dividing fxo in fbase formula */ 00309 00310 #define HIGH_BAND_FACTOR 6 /*!< Band select factor for high band. Factor B in the equation 2 */ 00311 #define MIDDLE_BAND_FACTOR 12 /*!< Band select factor for middle band. Factor B in the equation 2 */ 00312 #define LOW_BAND_FACTOR 16 /*!< Band select factor for low band. Factor B in the equation 2 */ 00313 #define VERY_LOW_BAND_FACTOR 32 /*!< Band select factor for very low band. Factor B in the equation 2 */ 00314 00315 #define HIGH_BAND_LOWER_LIMIT 778000000 /*!< Lower limit of the high band: 779 MHz */ 00316 #define HIGH_BAND_UPPER_LIMIT 957100000 /*!< Upper limit of the high band: 956 MHz */ 00317 #define MIDDLE_BAND_LOWER_LIMIT 386000000 /*!< Lower limit of the middle band: 387 MHz */ 00318 #define MIDDLE_BAND_UPPER_LIMIT 471100000 /*!< Upper limit of the middle band: 470 MHz */ 00319 #define LOW_BAND_LOWER_LIMIT 299000000 /*!< Lower limit of the low band: 300 MHz */ 00320 #define LOW_BAND_UPPER_LIMIT 349100000 /*!< Upper limit of the low band: 348 MHz */ 00321 #define VERY_LOW_BAND_LOWER_LIMIT 149000000 /*!< Lower limit of the very low band: 150 MHz */ 00322 #define VERY_LOW_BAND_UPPER_LIMIT 175100000 /*!< Upper limit of the very low band: 174 MHz */ 00323 00324 #define IS_FREQUENCY_BAND_HIGH(FREQUENCY) ((FREQUENCY)>=HIGH_BAND_LOWER_LIMIT && \ 00325 (FREQUENCY)<=HIGH_BAND_UPPER_LIMIT) 00326 00327 #define IS_FREQUENCY_BAND_MIDDLE(FREQUENCY) ((FREQUENCY)>=MIDDLE_BAND_LOWER_LIMIT && \ 00328 (FREQUENCY)<=MIDDLE_BAND_UPPER_LIMIT) 00329 00330 #define IS_FREQUENCY_BAND_LOW(FREQUENCY) ((FREQUENCY)>=LOW_BAND_LOWER_LIMIT && \ 00331 (FREQUENCY)<=LOW_BAND_UPPER_LIMIT) 00332 00333 #define IS_FREQUENCY_BAND_VERY_LOW(FREQUENCY) ((FREQUENCY)>=VERY_LOW_BAND_LOWER_LIMIT && \ 00334 (FREQUENCY)<=VERY_LOW_BAND_UPPER_LIMIT) 00335 00336 #define IS_FREQUENCY_BAND(FREQUENCY) (IS_FREQUENCY_BAND_HIGH(FREQUENCY)|| \ 00337 IS_FREQUENCY_BAND_MIDDLE(FREQUENCY)|| \ 00338 IS_FREQUENCY_BAND_LOW(FREQUENCY)|| \ 00339 IS_FREQUENCY_BAND_VERY_LOW(FREQUENCY)) 00340 00341 /** 00342 * @} 00343 */ 00344 00345 00346 /** @defgroup Radio_IF_Offset Radio IF Offset 00347 * @{ 00348 */ 00349 #define IF_OFFSET_ANA(F_Xo) (lroundf(480140.0/(F_Xo)*12288-64.0)) /*!< It represents the IF_OFFSET_ANA in order 00350 to have an intermediate frequency of 480 kHz */ 00351 /** 00352 * @} 00353 */ 00354 00355 00356 /** @defgroup Radio_FC_Offset Radio FC Offset 00357 * @{ 00358 */ 00359 #define F_OFFSET_DIVIDER 262144 /*!< 2^18 factor dividing fxo in foffset formula */ 00360 #define PPM_FACTOR 1000000 /*!< 10^6 factor to use with Xtal_offset_ppm */ 00361 00362 00363 #define F_OFFSET_LOWER_LIMIT(F_Xo) ((-(int32_t)F_Xo)/F_OFFSET_DIVIDER*2048) 00364 #define F_OFFSET_UPPER_LIMIT(F_Xo) ((int32_t)(F_Xo/F_OFFSET_DIVIDER*2047)) 00365 00366 #define IS_FREQUENCY_OFFSET(OFFSET, F_Xo) (OFFSET>=F_OFFSET_LOWER_LIMIT(F_Xo) && OFFSET<=F_OFFSET_UPPER_LIMIT(F_Xo)) 00367 00368 00369 /** 00370 * @} 00371 */ 00372 00373 00374 /** @defgroup Radio_Channel_Space Radio Channel Space 00375 * @{ 00376 */ 00377 00378 00379 #define CHSPACE_DIVIDER 32768 /*!< 2^15 factor dividing fxo in channel space formula */ 00380 00381 #define IS_CHANNEL_SPACE(CHANNELSPACE, F_Xo) (CHANNELSPACE<=(F_Xo/32768*255)) 00382 00383 00384 00385 00386 00387 /** 00388 * @} 00389 */ 00390 00391 00392 /** @defgroup Radio_Datarate Radio Datarate 00393 * @{ 00394 */ 00395 #define MINIMUM_DATARATE 100 /*!< Minimum datarate supported by SPIRIT1 100 bps */ 00396 #define MAXIMUM_DATARATE 510000 /*!< Maximum datarate supported by SPIRIT1 500 kbps */ 00397 00398 #define IS_DATARATE(DATARATE) (DATARATE>=MINIMUM_DATARATE && DATARATE<=MAXIMUM_DATARATE) 00399 00400 /** 00401 * @} 00402 */ 00403 00404 00405 /** @defgroup Radio_Frequency_Deviation Radio Frequency Deviation 00406 * @{ 00407 */ 00408 #define F_DEV_MANTISSA_UPPER_LIMIT 7 /*!< Maximum value for the mantissa in frequency deviation formula */ 00409 #define F_DEV_EXPONENT_UPPER_LIMIT 9 /*!< Maximum value for the exponent in frequency deviation formula */ 00410 00411 #define F_DEV_LOWER_LIMIT(F_Xo) (F_Xo>>16) 00412 #define F_DEV_UPPER_LIMIT(F_Xo) ((F_Xo*15)>>10) 00413 00414 #define IS_F_DEV(FDEV,F_Xo) (FDEV>=F_DEV_LOWER_LIMIT(F_Xo) && FDEV<=F_DEV_UPPER_LIMIT(F_Xo)) 00415 00416 00417 /** 00418 * @} 00419 */ 00420 00421 00422 /** @defgroup Radio_Channel_Bandwidth Radio Channel Bandwidth 00423 * @{ 00424 */ 00425 #define CH_BW_LOWER_LIMIT(F_Xo) 1100*(F_Xo/1000000)/26 /*!< Minimum value of the channel filter bandwidth */ 00426 #define CH_BW_UPPER_LIMIT(F_Xo) 800100*(F_Xo/1000000)/26 /*!< Maximum value of the channel filter bandwidth */ 00427 00428 #define IS_CH_BW(BW,F_Xo) ((BW)>=CH_BW_LOWER_LIMIT(F_Xo) && (BW)<=CH_BW_UPPER_LIMIT(F_Xo)) 00429 00430 /** 00431 * @} 00432 */ 00433 00434 00435 /** @defgroup Radio_Power_Amplifier Radio Power Amplifier 00436 * @{ 00437 */ 00438 00439 #define IS_PA_MAX_INDEX(INDEX) ((INDEX)<=7) 00440 #define IS_PAPOWER_DBM(PATABLE) ((PATABLE)>= (-31) && (PATABLE)<=(12)) 00441 #define IS_PAPOWER(PATABLE) ((PATABLE)<=90) 00442 #define IS_PA_STEP_WIDTH(WIDTH) ((WIDTH)>=1 && (WIDTH)<=4) 00443 00444 /** 00445 * @} 00446 */ 00447 00448 00449 /** @defgroup Radio_Automatic_Frequency_Correction Radio Automatic Frequency Correction 00450 * @{ 00451 */ 00452 00453 #define IS_AFC_FAST_GAIN(GAIN) ((GAIN)<=15) 00454 #define IS_AFC_SLOW_GAIN(GAIN) ((GAIN)<=15) 00455 #define IS_AFC_PD_LEAKAGE(LEAKAGE) ((LEAKAGE)<=31) 00456 00457 /** 00458 * @} 00459 */ 00460 00461 /** @defgroup Radio_Automatic_Gain_Control Radio Automatic Gain Control 00462 * @{ 00463 */ 00464 00465 #define AGC_MEASURE_TIME_UPPER_LIMIT_US(F_Xo) (393216.0/F_Xo) 00466 00467 #define IS_AGC_MEASURE_TIME_US(TIME, F_Xo) (TIME<=AGC_MEASURE_TIME_UPPER_LIMIT_US(F_Xo)) 00468 00469 #define IS_AGC_MEASURE_TIME(TIME) (TIME<=15) 00470 00471 #define AGC_HOLD_TIME_UPPER_LIMIT_US(F_Xo) (756.0/F_Xo) 00472 00473 #define IS_AGC_HOLD_TIME_US(TIME,F_Xo) (TIME<=AGC_HOLD_TIME_UPPER_LIMIT_US(F_Xo)) 00474 00475 00476 #define IS_AGC_HOLD_TIME(TIME) (TIME<=63) 00477 00478 #define IS_AGC_THRESHOLD(THRESHOLD) (THRESHOLD<=15) 00479 00480 /** 00481 * @} 00482 */ 00483 00484 00485 /** @defgroup Radio_Clock_Recovery Radio Clock Recovery 00486 * @{ 00487 */ 00488 00489 #define IS_CLK_REC_P_GAIN(GAIN) ((GAIN)<=7) 00490 #define IS_CLK_REC_I_GAIN(GAIN) ((GAIN)<=15) 00491 00492 /** 00493 * @} 00494 */ 00495 00496 /** 00497 * @} 00498 */ 00499 00500 00501 00502 /** @defgroup Radio_Exported_Macros Radio Exported Macros 00503 * @{ 00504 */ 00505 00506 00507 /** 00508 * @} 00509 */ 00510 00511 /** @defgroup Radio_Exported_Functions Radio Exported Functions 00512 * @{ 00513 */ 00514 00515 uint8_t SpiritRadioInit(SRadioInit* pxSRadioInitStruct); 00516 void SpiritRadioGetInfo(SRadioInit* pxSRadioInitStruct); 00517 void SpiritRadioSetXtalFlag(XtalFlag xXtal); 00518 XtalFlag SpiritRadioGetXtalFlag(void); 00519 uint8_t SpiritRadioSearchWCP(uint32_t lFc); 00520 void SpiritRadioSetSynthWord(uint32_t lSynthWord); 00521 uint32_t SpiritRadioGetSynthWord(void); 00522 void SpiritRadioSetBand(BandSelect xBand); 00523 BandSelect SpiritRadioGetBand(void); 00524 void SpiritRadioSetChannel(uint8_t cChannel); 00525 uint8_t SpiritRadioGetChannel(void); 00526 void SpiritRadioSetChannelSpace(uint32_t lChannelSpace); 00527 uint32_t SpiritRadioGetChannelSpace(void); 00528 void SpiritRadioSetFrequencyOffsetPpm(int16_t nXtalPpm); 00529 void SpiritRadioSetFrequencyOffset(int32_t lFOffset); 00530 int32_t SpiritRadioGetFrequencyOffset(void); 00531 void SpiritRadioVcoCalibrationWAFB(SpiritFunctionalState xNewstate); 00532 uint8_t SpiritRadioSetFrequencyBase(uint32_t lFBase); 00533 uint32_t SpiritRadioGetFrequencyBase(void); 00534 uint32_t SpiritRadioGetCenterFrequency(void); 00535 void SpiritRadioSearchDatarateME(uint32_t lDatarate, uint8_t* pcM, uint8_t* pcE); 00536 void SpiritRadioSearchFreqDevME(uint32_t lFDev, uint8_t* pcM, uint8_t* pcE); 00537 void SpiritRadioSearchChannelBwME(uint32_t lBandwidth, uint8_t* pcM, uint8_t* pcE); 00538 void SpiritRadioSetDatarate(uint32_t lDatarate); 00539 uint32_t SpiritRadioGetDatarate(void); 00540 void SpiritRadioSetFrequencyDev(uint32_t lFDev); 00541 uint32_t SpiritRadioGetFrequencyDev(void); 00542 void SpiritRadioSetChannelBW(uint32_t lBandwidth); 00543 uint32_t SpiritRadioGetChannelBW(void); 00544 void SpiritRadioSetModulation(ModulationSelect xModulation); 00545 ModulationSelect SpiritRadioGetModulation(void); 00546 void SpiritRadioCWTransmitMode(SpiritFunctionalState xNewState); 00547 void SpiritRadioSetOokPeakDecay(OokPeakDecay xOokDecay); 00548 OokPeakDecay SpiritRadioGetOokPeakDecay(void); 00549 uint8_t SpiritRadioGetdBm2Reg(uint32_t lFBase, float fPowerdBm); 00550 float SpiritRadioGetReg2dBm(uint32_t lFBase, uint8_t cPowerReg); 00551 void SpiritRadioSetPATabledBm(uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, float* pfPAtabledBm); 00552 void SpiritRadioGetPATabledBm(uint8_t* pcPALevelMaxIndex, float* pfPAtabledBm); 00553 void SpiritRadioSetPATable(uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, uint8_t* pcPAtable); 00554 void SpiritRadioGetPATable(uint8_t* pcPALevelMaxIndex, uint8_t* pcPAtable); 00555 void SpiritRadioSetPALeveldBm(uint8_t cIndex, float fPowerdBm); 00556 float SpiritRadioGetPALeveldBm(uint8_t cIndex); 00557 void SpiritRadioSetPALevel(uint8_t cIndex, uint8_t cPower); 00558 uint8_t SpiritRadioGetPALevel(uint8_t cIndex); 00559 void SpiritRadioSetPACwc(PALoadCapacitor xCLoad); 00560 PALoadCapacitor SpiritRadioGetPACwc(void); 00561 void SpiritRadioSetPALevelMaxIndex(uint8_t cIndex); 00562 uint8_t SpiritRadioGetPALevelMaxIndex(void); 00563 void SpiritRadioSetPAStepWidth(uint8_t cWidth); 00564 uint8_t SpiritRadioGetPAStepWidth(void); 00565 void SpiritRadioPARamping(SpiritFunctionalState xNewState); 00566 SpiritFunctionalState SpiritRadioGetPARamping(void); 00567 void SpiritRadioAFC(SpiritFunctionalState xNewState); 00568 void SpiritRadioAFCFreezeOnSync(SpiritFunctionalState xNewState); 00569 void SpiritRadioSetAFCMode(AFCMode xMode); 00570 AFCMode SpiritRadioGetAFCMode(void); 00571 void SpiritRadioSetAFCPDLeakage(uint8_t cLeakage); 00572 uint8_t SpiritRadioGetAFCPDLeakage(void); 00573 void SpiritRadioSetAFCFastPeriod(uint8_t cLength); 00574 uint8_t SpiritRadioGetAFCFastPeriod(void); 00575 void SpiritRadioSetAFCFastGain(uint8_t cGain); 00576 uint8_t SpiritRadioGetAFCFastGain(void); 00577 void SpiritRadioSetAFCSlowGain(uint8_t cGain); 00578 uint8_t SpiritRadioGetAFCSlowGain(void); 00579 int8_t SpiritRadioGetAFCCorrectionReg(void); 00580 int32_t SpiritRadioGetAFCCorrectionHz(void); 00581 void SpiritRadioAGC(SpiritFunctionalState xNewState); 00582 void SpiritRadioSetAGCMode(AGCMode xMode); 00583 AGCMode SpiritRadioGetAGCMode(void); 00584 void SpiritRadioAGCFreezeOnSteady(SpiritFunctionalState xNewState); 00585 void SpiritRadioAGCFreezeOnSync(SpiritFunctionalState xNewState); 00586 void SpiritRadioAGCStartMaxAttenuation(SpiritFunctionalState xNewState); 00587 void SpiritRadioSetAGCMeasureTimeUs(uint16_t nTime); 00588 uint16_t SpiritRadioGetAGCMeasureTimeUs(void); 00589 void SpiritRadioSetAGCMeasureTime(uint8_t cTime); 00590 uint8_t SpiritRadioGetAGCMeasureTime(void); 00591 void SpiritRadioSetAGCHoldTimeUs(uint8_t cTime); 00592 uint8_t SpiritRadioGetAGCHoldTimeUs(void); 00593 void SpiritRadioSetAGCHoldTime(uint8_t cTime); 00594 uint8_t SpiritRadioGetAGCHoldTime(void); 00595 void SpiritRadioSetAGCHighThreshold(uint8_t cHighThreshold); 00596 uint8_t SpiritRadioGetAGCHighThreshold(void); 00597 void SpiritRadioSetAGCLowThreshold(uint8_t cLowThreshold); 00598 uint8_t SpiritRadioGetAGCLowThreshold(void); 00599 void SpiritRadioSetClkRecMode(ClkRecMode xMode); 00600 ClkRecMode SpiritRadioGetClkRecMode(void); 00601 void SpiritRadioSetClkRecPGain(uint8_t cPGain); 00602 uint8_t SpiritRadioGetClkRecPGain(void); 00603 void SpiritRadioSetClkRecIGain(uint8_t cIGain); 00604 uint8_t SpiritRadioGetClkRecIGain(void); 00605 void SpiritRadioSetClkRecPstFltLength(PstFltLength xLength); 00606 PstFltLength SpiritRadioGetClkRecPstFltLength(void); 00607 void SpiritRadioCsBlanking(SpiritFunctionalState xNewState); 00608 void SpiritRadioPersistenRx(SpiritFunctionalState xNewState); 00609 uint32_t SpiritRadioGetXtalFrequency(void); 00610 void SpiritRadioSetXtalFrequency(uint32_t lXtalFrequency); 00611 void SpiritRadioSetRefDiv(SpiritFunctionalState xNewState); 00612 SpiritFunctionalState SpiritRadioGetRefDiv(void); 00613 void SpiritRadioSetDigDiv(SpiritFunctionalState xNewState); 00614 SpiritFunctionalState SpiritRadioGetDigDiv(void); 00615 /** 00616 * @} 00617 */ 00618 00619 /** 00620 * @} 00621 */ 00622 00623 00624 /** 00625 * @} 00626 */ 00627 00628 00629 00630 #ifdef __cplusplus 00631 } 00632 #endif 00633 00634 #endif 00635 00636 /******************* (C) COPYRIGHT 2015 STMicroelectronics *****END OF FILE****/
Generated on Wed Jul 13 2022 17:25:37 by
