altos/telelco: Crank up SPI speed to cc1111
authorKeith Packard <keithp@keithp.com>
Mon, 15 Oct 2012 07:06:57 +0000 (00:06 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 15 Oct 2012 07:06:57 +0000 (00:06 -0700)
The cc1111 can handle up to 3MHz, so use 2MHz. Also, crank down the
packet wait time to 10ms, which should be plenty long for the remote
box to receive and return a packet.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_lco_func.c
src/drivers/ao_radio_master.c

index 99e58b76f872bc014e992ae622242cce1bc80701..4af17fd68ce24919d6c63baae1ea9ee9ecf56351 100644 (file)
@@ -37,7 +37,7 @@ ao_lco_query(uint16_t box, struct ao_pad_query *query, uint16_t *tick_offset)
        command.channels = 0;
        ao_radio_cmac_send(&command, sizeof (command));
        sent_time = ao_time();
-       r = ao_radio_cmac_recv(query, sizeof (*query), AO_MS_TO_TICKS(20));
+       r = ao_radio_cmac_recv(query, sizeof (*query), AO_MS_TO_TICKS(10));
        if (r == AO_RADIO_CMAC_OK)
                *tick_offset = sent_time - query->tick;
        ao_mutex_put(&ao_lco_mutex);
index 73ac3c03803e06425f3f711d59ff29fa6d022e28..4a37ace06c39aefd66501e79af0aea295244bd5d 100644 (file)
@@ -53,7 +53,7 @@ ao_radio_master_start(void)
 {
        ao_spi_get_bit(AO_RADIO_CS_PORT, AO_RADIO_CS_PIN, AO_RADIO_CS,
                       AO_RADIO_SPI_BUS,
-                      AO_SPI_SPEED_200kHz);
+                      AO_SPI_SPEED_2MHz);
 }
 
 static void