We have a custom board and therefore a custom .syscfg file (attached).
As such, we have added rfDriverCallbackCustom() as well as initAntennaSwitch(). These functions are modeled off the ones generated for the Launchpad and work fine.
The problem is that the generated ti_driver_config.c includes its own initRfFrontend() which is never called or used. This unused function has a couple of static variable that are initialized so the linker is creating the "set but never used" warning.
Seems as though this snippet of code should be excluded from ti_driver_config.c when using a custom board.
static PIN_Handle frontendPins;
static PIN_State frontendState;
void initRfFrontend(void)
{
static bool initialized = false;
if (!initialized) {
PIN_Config frontendConfig[] = {
CONFIG_RF_24GHZ | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Path disabled */
CONFIG_RF_HIGH_PA | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Path disabled */
PIN_TERMINATE
};
frontendPins = PIN_open(&frontendState, frontendConfig);
initialized = true;
}
}
/cfs-file/__key/communityserver-discussions-components-files/158/ZFR183x_5F00_PWB.zip