I've noticed that most source code examples for the CC430 set up the RF registers with something like this:
/*================================ WriteRfSettings =================================
** @fn WriteRfSettings
** @brief Write the minimum set of RF configuration register settings
** @param RF_SETTINGS *pRfSettings Pointer to the structure that holds the rf settings
** @return none
**--------------------------------------------------------------------------------*/
void WriteRfSettings(RF_SETTINGS *pRfSettings)
{
WriteSingleReg(SYNC1, pRfSettings->sync1);
WriteSingleReg(SYNC0, pRfSettings->sync0);
WriteSingleReg(FSCTRL1, pRfSettings->fsctrl1);
.....
}
This calls WriteSingleReg for each register and value. As far as I can tell, this takes up over 800 bytes of code space just to initialize the RF registers. Wouldn't it be more efficient to set up the RfSettings structure so that the ordering matched the RF registers, and just make a single call to WriteBurstReg to initialize these? Or is there some reason why this wouldn't work?
I haven't actually tried this yet, but I'm looking for ways to reduce my overall code size, and this seemed like a big one...