diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-28 23:02:12 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-07 20:07:52 -0700 |
commit | f677a83348a9568679240ee9d731ab454f289831 (patch) | |
tree | 8a8bd51ae7cce01fac472fb33a653f0489e74f0d /src/drivers/ao_radio_master.c | |
parent | 0488cd9cffc837e99490a0761216bbc5847ff400 (diff) |
altos: Provide timeout value to ao_radio_recv
Instead of using ao_alarm around calls to ao_radio_recv, provide an
explicit timeout value as needed by radio functions with more
complicated system interaction than the cc1111. The timeout is 8 bits
of clock ticks.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_radio_master.c')
-rw-r--r-- | src/drivers/ao_radio_master.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/ao_radio_master.c b/src/drivers/ao_radio_master.c index 1e0050c8..128fcf32 100644 --- a/src/drivers/ao_radio_master.c +++ b/src/drivers/ao_radio_master.c @@ -156,7 +156,7 @@ ao_radio_send(const void *d, uint8_t size) uint8_t -ao_radio_recv(__xdata void *d, uint8_t size) +ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout) { int8_t ret; uint8_t recv; @@ -166,6 +166,7 @@ ao_radio_recv(__xdata void *d, uint8_t size) ao_radio_get(AO_RADIO_SPI_RECV, 0); ao_radio_spi_request.recv_len = size; + ao_radio_spi_request.timeout = timeout; recv = ao_radio_master_send(); if (!recv) { ao_radio_put(); |