Contiki 2.5
token-phy.h
Go to the documentation of this file.
1 /**
2  * @file token-phy.h
3  * @brief Definitions for phy tokens.
4  *
5  * The file token-phy.h should not be included directly.
6  * It is accessed by the other token files.
7  *
8  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
9  */
10 
11 #ifndef DEFINE_INDEXED_TOKEN
12  #define DEFINE_INDEXED_TOKEN(name, type, arraysize, ...) \
13  TOKEN_DEF(name, CREATOR_##name, 0, 1, type, (arraysize), __VA_ARGS__)
14 #endif
15 
16 
17 #if defined PHY_STM32W108XX
18 
19 #ifdef DEFINETYPES
20 typedef struct {
21  int8u vcoAtLna; // the VCO tune value at the time LNA value was calculated.
22  int8u modDac; // msb : cal needed , bit 0-5 : value
23  int8u filter; // msb : cal needed , bit 0-4 : value
24  int8u lna; // msb : cal needed , bit 0-5 : value
25 } tokTypeStackCalData;
26 #endif
27 
28 
29 #ifdef DEFINETOKENS
30 
31 #define CREATOR_STACK_CAL_DATA 0xD243 // msb+'R'+'C' (Radio Calibration)
32 #define STACK_CAL_DATA_ARRAY_SIZE 16
33 
34 
35 // This breaks the simulated eeprom unit test, so we ifdef it out
36 // of existence.
37 #ifndef ST_TEST
38 DEFINE_INDEXED_TOKEN(STACK_CAL_DATA,
39  tokTypeStackCalData, STACK_CAL_DATA_ARRAY_SIZE,
40  {
41  0xff, // vcoAtLna default: invalid VCO value.
42  0x80, // modDac default: cal needed.
43  0x80, // filter default: cal needed.
44  0x80 // lna default: cal needed.
45  })
46 #endif //ST_TEST
47 
48 #endif //DEFINETOKENS
49 
50 #endif // defined PHY_STM32W108XX
51