Part Number: TI-15.4-STACK-GATEWAY-LINUX-SDK
I am using TI-15-4-STACK-GATEWAY-LINUX-SDK_4.30.00.06 and know that TI Linux implementation uses a runtime variable rather than a compile time constant.
Most of coding is clear to me, except CONFIG_MAC_BEACON_ORDER (in collector.c) and CONFIG_PHY_ID (collector.c, collector.h, and ti_154stack_config.h).
Take CONFIG_MAC_BEACON_ORDER as an example.
--- snipped code ---
#if (CONFIG_MAC_BEACON_ORDER != NON_BEACON_ORDER)
/* This is 3 times the polling interval used in beacon mode. */
#define TRACKING_TIMEOUT_TIME ((1<<CONFIG_MAC_BEACON_ORDER) * 960 * SYMBOL_DURATION * 3 / 1000) /*in milliseconds*/
#else
#define TRACKING_TIMEOUT_TIME (CONFIG_POLLING_INTERVAL * 3) /*in milliseconds*/
#endif
--- snipped code ---
My understanding is "the pre-processor cannot use variables from the C program in expressions, it can only act on pre-processor macros."
So code above to use CONFIG_MAC_BEACON_ORDER in the pre-processor is out of my expectation. Actually it always return true. Am I correct?
Regards,
Peter.