We read register values during regular operation, so let's improve
performance a bit by making this faster.
Signed-off-by: Keith Packard <keithp@keithp.com>
static uint8_t
ao_radio_reg_read(uint16_t addr)
{
static uint8_t
ao_radio_reg_read(uint16_t addr)
{
uint8_t d;
#if CC1200_TRACE
uint8_t d;
#if CC1200_TRACE
d = 1;
}
ao_radio_select();
d = 1;
}
ao_radio_select();
- ao_radio_spi_send(data, d);
- ao_radio_spi_recv(data, 1);
+ ao_radio_duplex(data, data, d + 1);
ao_radio_deselect();
#if CC1200_TRACE
ao_radio_deselect();
#if CC1200_TRACE
- printf (" %02x\n", data[0]);
+ printf (" %02x\n", data[d]);