diff options
| author | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 |
| commit | 6e9bb9178356620bd47d9f2e31abf42b7f1a8f11 (patch) | |
| tree | 6f04b5500462d1f6e26ebcba58c5e9cd56afd442 /src/cc1111 | |
| parent | e2cefd8593d269ce603aaf33f4a53a5c2dcb3350 (diff) | |
| parent | 87c8bb3956897830da1f7aaca2990a9571767b73 (diff) | |
Merge branch 'master' into branch-1.6
Diffstat (limited to 'src/cc1111')
| -rw-r--r-- | src/cc1111/ao_arch.h | 2 | ||||
| -rw-r--r-- | src/cc1111/ao_button.c | 4 | ||||
| -rw-r--r-- | src/cc1111/ao_radio.c | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/src/cc1111/ao_arch.h b/src/cc1111/ao_arch.h index b3c6b5dc..6eb1a111 100644 --- a/src/cc1111/ao_arch.h +++ b/src/cc1111/ao_arch.h @@ -228,7 +228,7 @@ void ao_button_init(void); char -ao_button_get(void) __critical; +ao_button_get(uint16_t timeout) __critical; void ao_button_clear(void) __critical; diff --git a/src/cc1111/ao_button.c b/src/cc1111/ao_button.c index 69f3475f..a0f221c2 100644 --- a/src/cc1111/ao_button.c +++ b/src/cc1111/ao_button.c @@ -72,12 +72,12 @@ ao_button_mask(uint8_t reg) } char -ao_button_get(void) __critical +ao_button_get(uint16_t timeout) __critical { char b; while (ao_fifo_empty(ao_button_fifo)) - if (ao_sleep(&ao_button_fifo)) + if (ao_sleep_for(&ao_button_fifo, timeout)) return 0; ao_fifo_remove(ao_button_fifo, b); return b; diff --git a/src/cc1111/ao_radio.c b/src/cc1111/ao_radio.c index b9821a42..cead0364 100644 --- a/src/cc1111/ao_radio.c +++ b/src/cc1111/ao_radio.c @@ -451,13 +451,9 @@ ao_radio_recv(__xdata void *packet, uint8_t size, uint8_t timeout) __reentrant /* Wait for DMA to be done, for the radio receive process to * get aborted or for a receive timeout to fire */ - if (timeout) - ao_alarm(timeout); __critical while (!ao_radio_dma_done && !ao_radio_abort) - if (ao_sleep(&ao_radio_dma_done)) + if (ao_sleep_for(&ao_radio_dma_done, timeout)) break; - if (timeout) - ao_clear_alarm(); /* If recv was aborted, clean up by stopping the DMA engine * and idling the radio |
