This example illustrates the use of the basic radio transceiver access functions. It can also be used to test a new board definition.
#include "board.h"
#include "transceiver.h"
#include "ioutil.h"
#include "xmpl.h"
int main(void)
{
ERR_CHECK(RADIO_PART_NUM != rval);
ERR_CHECK_DIAG(RADIO_VERSION_NUM !=rval,2);
ERR_CHECK_DIAG((42!=rval),3);
ERR_CHECK_DIAG((TRX_OFF!=rval),4);
irq_cause = 0;
ERR_CHECK_DIAG((0==irq_cause),6);
while(1)
{
WAIT500MS();
}
}
#if defined(TRX_IF_RFA1)
ISR(TRX24_PLL_LOCK_vect)
{
irq_cause |= TRX_IRQ_PLL_LOCK;
}
#else
ISR(TRX_IRQ_vect)
{
}
#endif