diff options
author | Bdale Garbee <bdale@gag.com> | 2015-02-07 22:39:54 -0700 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2015-02-07 22:39:54 -0700 |
commit | f766a457323268857b3f2dfc7f42427437b71cb7 (patch) | |
tree | 8afc8a661d682fc34b16fc0b1b44f2844d34f336 /src/drivers/ao_cc1120.c | |
parent | db51224af01731e7323f6f696a7397d64eb80b92 (diff) | |
parent | e2cefd8593d269ce603aaf33f4a53a5c2dcb3350 (diff) |
Merge branch 'branch-1.6' into debian
Conflicts:
ChangeLog
altoslib/AltosTelemetryReader.java
configure.ac
Diffstat (limited to 'src/drivers/ao_cc1120.c')
-rw-r--r-- | src/drivers/ao_cc1120.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drivers/ao_cc1120.c b/src/drivers/ao_cc1120.c index 3ea8b704..90d6cc75 100644 --- a/src/drivers/ao_cc1120.c +++ b/src/drivers/ao_cc1120.c @@ -1125,12 +1125,12 @@ ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout) ao_exti_set_mode(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN, AO_EXTI_MODE_FALLING|AO_EXTI_PRIORITY_HIGH); - ao_exti_set_callback(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN, ao_radio_rx_isr); - ao_exti_enable(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN); - rx_starting = 1; rx_task_id = ao_cur_task->task_id; + ao_exti_set_callback(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN, ao_radio_rx_isr); + ao_exti_enable(AO_CC1120_INT_PORT, AO_CC1120_INT_PIN); + ao_radio_strobe(CC1120_SRX); if (timeout) @@ -1148,8 +1148,9 @@ ao_radio_recv(__xdata void *d, uint8_t size, uint8_t timeout) ao_clear_alarm(); if (ao_radio_abort) { + if (rx_task_id_save == 0) + ao_radio_burst_read_stop(); ret = 0; - rx_task_id = 0; goto abort; } |