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);
}
#if (BSP430_PLATFORM_EXP430G2 - 0)
#define BSP430_PLATFORM_BOOT_CONFIGURE_LFXT1 0
#else
#define BSP430_PLATFORM_BOOT_CONFIGURE_LFXT1 1
#endif
#define BSP430_CLOCK_NOMINAL_MCLK_HZ (8*1000*1000UL)
#define BSP430_PLATFORM_BOOT_SMCLK_DIVIDING_SHIFT 1
#define configBSP430_PLATFORM_SPIN_FOR_JUMPER 1
#define configBSP430_CONSOLE 1
#define configBSP430_UPTIME 1
#ifndef configBSP430_RF_ANAREN_CC110L
#define configBSP430_RF_ANAREN_CC110L \
((BSP430_PLATFORM_EXP430G2 - 0) \
|| (BSP430_PLATFORM_EXP430F5529LP - 0) \
|| (BSP430_PLATFORM_EXP430FR4133 - 0) \
|| (BSP430_PLATFORM_EXP430FR5969 - 0))
#endif
#if ! (configBSP430_RF_ANAREN_CC110L - 0) && ! defined(configBSP430_RFEM_CCEM)
#define configBSP430_RFEM_CCEM ((BSP430_PLATFORM_EXP430G2 - 0) || (BSP430_PLATFORM_EXP430F5529LP - 0))
#endif
#if ! (configBSP430_RFEM_CCEM - 0)
#define configBSP430_RFEM 1
#endif
#define configBSP430_PLATFORM_RF 1
#define configBSP430_RF_CC110XEMK 1
PLATFORM ?= exp430g2
TEST_PLATFORMS=exp430f5438 exp430f5529 exp430fr5739 exp430g2 trxeb
MODULES=$(MODULES_PLATFORM)
MODULES += $(MODULES_UPTIME)
MODULES += $(MODULES_CONSOLE)
MODULES += periph/port
SRC=main.c
include $(BSP430_ROOT)/make/Makefile.common