52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
/**
|
|
* @file token-phy.h
|
|
* @brief Definitions for phy tokens.
|
|
*
|
|
* The file token-phy.h should not be included directly.
|
|
* It is accessed by the other token files.
|
|
*
|
|
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
|
|
*/
|
|
|
|
#ifndef DEFINE_INDEXED_TOKEN
|
|
#define DEFINE_INDEXED_TOKEN(name, type, arraysize, ...) \
|
|
TOKEN_DEF(name, CREATOR_##name, 0, 1, type, (arraysize), __VA_ARGS__)
|
|
#endif
|
|
|
|
|
|
#if defined PHY_STM32W108XX
|
|
|
|
#ifdef DEFINETYPES
|
|
typedef struct {
|
|
int8u vcoAtLna; // the VCO tune value at the time LNA value was calculated.
|
|
int8u modDac; // msb : cal needed , bit 0-5 : value
|
|
int8u filter; // msb : cal needed , bit 0-4 : value
|
|
int8u lna; // msb : cal needed , bit 0-5 : value
|
|
} tokTypeStackCalData;
|
|
#endif
|
|
|
|
|
|
#ifdef DEFINETOKENS
|
|
|
|
#define CREATOR_STACK_CAL_DATA 0xD243 // msb+'R'+'C' (Radio Calibration)
|
|
#define STACK_CAL_DATA_ARRAY_SIZE 16
|
|
|
|
|
|
// This breaks the simulated eeprom unit test, so we ifdef it out
|
|
// of existence.
|
|
#ifndef ST_TEST
|
|
DEFINE_INDEXED_TOKEN(STACK_CAL_DATA,
|
|
tokTypeStackCalData, STACK_CAL_DATA_ARRAY_SIZE,
|
|
{
|
|
0xff, // vcoAtLna default: invalid VCO value.
|
|
0x80, // modDac default: cal needed.
|
|
0x80, // filter default: cal needed.
|
|
0x80 // lna default: cal needed.
|
|
})
|
|
#endif //ST_TEST
|
|
|
|
#endif //DEFINETOKENS
|
|
|
|
#endif // defined PHY_STM32W108XX
|
|
|