token-phy.h

Go to the documentation of this file.
00001 /** 
00002  * @file token-phy.h
00003  * @brief Definitions for phy tokens.
00004  *
00005  * The file token-phy.h should not be included directly. 
00006  * It is accessed by the other token files. 
00007  *
00008  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved.        -->
00009  */
00010 
00011 #ifndef DEFINE_INDEXED_TOKEN
00012   #define DEFINE_INDEXED_TOKEN(name, type, arraysize, ...)  \
00013     TOKEN_DEF(name, CREATOR_##name, 0, 1, type, (arraysize),  __VA_ARGS__)
00014 #endif
00015 
00016 
00017 #if defined PHY_STM32W108XX 
00018 
00019 #ifdef DEFINETYPES
00020 typedef struct {
00021   int8u vcoAtLna; // the VCO tune value at the time LNA value was calculated.
00022   int8u modDac;   // msb : cal needed , bit 0-5 : value
00023   int8u filter;   // msb : cal needed , bit 0-4 : value
00024   int8u lna;      // msb : cal needed , bit 0-5 : value
00025 } tokTypeStackCalData;
00026 #endif 
00027 
00028 
00029 #ifdef DEFINETOKENS
00030 
00031 #define CREATOR_STACK_CAL_DATA         0xD243 // msb+'R'+'C' (Radio Calibration)
00032 #define STACK_CAL_DATA_ARRAY_SIZE       16
00033 
00034 
00035 // This breaks the simulated eeprom unit test, so we ifdef it out
00036 // of existence.
00037 #ifndef ST_TEST
00038 DEFINE_INDEXED_TOKEN(STACK_CAL_DATA,
00039                      tokTypeStackCalData, STACK_CAL_DATA_ARRAY_SIZE,
00040                      { 
00041                        0xff, // vcoAtLna default: invalid VCO value.
00042                        0x80, // modDac default: cal needed.
00043                        0x80, // filter default: cal needed.
00044                        0x80  // lna default: cal needed.
00045                      })
00046 #endif //ST_TEST
00047 
00048 #endif //DEFINETOKENS
00049 
00050 #endif // defined PHY_STM32W108XX 
00051 

Generated on Mon Apr 11 14:23:41 2011 for Contiki 2.5 by  doxygen 1.6.1