summaryrefslogtreecommitdiff
path: root/src/drivers/ao_cc1120.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-01-13 21:38:26 -0800
committerKeith Packard <keithp@keithp.com>2013-01-13 21:38:26 -0800
commitf24c4219de9563cf0ef24b763ce54d961c182696 (patch)
tree3ebcf489ac3f2c46e71c13bb62ecf8b47285e1cc /src/drivers/ao_cc1120.c
parenta866431e9a063830b407f749ff97a730831e5e4e (diff)
altos: Change CC1120 SPI speed to 4MHz.
Most of the chip can run at 8MHz, but extended register access is limited to 6.1MHz. Instead of pushing things, just run the SPI bus at 4MHz. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_cc1120.c')
-rw-r--r--src/drivers/ao_cc1120.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c
index 8068740f..53bb5a62 100644
--- a/src/drivers/ao_cc1120.c
+++ b/src/drivers/ao_cc1120.c
@@ -38,7 +38,7 @@ extern const uint32_t ao_radio_cal;
#define FOSC 32000000
-#define ao_radio_select() ao_spi_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_SPI_SPEED_1MHz)
+#define ao_radio_select() ao_spi_get_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS,AO_SPI_SPEED_4MHz)
#define ao_radio_deselect() ao_spi_put_mask(AO_CC1120_SPI_CS_PORT,(1 << AO_CC1120_SPI_CS_PIN),AO_CC1120_SPI_BUS)
#define ao_radio_spi_send(d,l) ao_spi_send((d), (l), AO_CC1120_SPI_BUS)
#define ao_radio_spi_send_fixed(d,l) ao_spi_send_fixed((d), (l), AO_CC1120_SPI_BUS)