static uint8_t
sendStrobe (uint8_t reg)
{
uint8_t rc = 0;
return rc;
}
static uint8_t
readRegister (uint8_t reg)
{
uint8_t rxbuf[2];
if (0x30 <= reg) {
reg |= 0x40;
}
reg |= 0x80;
return rxbuf[1];
}
static int
writeRegister (uint8_t reg,
uint8_t val)
{
uint8_t txbuf[2];
uint8_t rxbuf[2];
txbuf[0] = reg;
txbuf[1] = val;
return rxbuf[1];
}
void main ()
{
int rc = 0;
cprintf(
"\nccid " __DATE__
" " __TIME__
"\n");
#if BSP430_PLATFORM_PERIPHERAL_HELP
#endif
cprintf(__DATE__
" " __TIME__
"\n");
if (spi) {
}
cprintf(
"SPI device %p hold returned %d\n", spi, rc);
if (! spi) {
return;
}
cprintf(
"Waiting for radio ready\n");
}
cprintf(
"Radio is up, hold release %d; sending SRES strobe\n", rc);
do {
rc = sendStrobe(0x30);
cprintf(
"Strobe response %#02x\n", rc);
if (0x0F != rc) {
}
} while (0x0F != rc);
cprintf(
"PARTNUM response %#02x\n", readRegister(0x30));
cprintf(
"VERSION response %#02x\n", readRegister(0x31));
cprintf(
"IOCFG2 read %#02x\n", readRegister(0x00));
cprintf(
"IOCFG1 read %#02x\n", readRegister(0x01));
cprintf(
"IOCFG0 read %#02x\n", readRegister(0x02));
rc = writeRegister(0x00, 0x2f);
rc = writeRegister(0x01, 0x2f);
rc = writeRegister(0x02, 0x2f);
cprintf(
"IOCFG2 read %#02x\n", readRegister(0x00));
cprintf(
"IOCFG1 read %#02x\n", readRegister(0x01));
cprintf(
"IOCFG0 read %#02x\n", readRegister(0x02));
rc = sendStrobe(0x39);
}