From 437eba2ff27b2b7dfd0f363819b9a43ab8b28ead Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 6 Nov 2014 20:04:47 -0800 Subject: [PATCH] altos: Reset interrupt flags before TX in CC1200 driver Failing to reset the flags set during interrupt leads to short-circuiting transmission and not a lot of packets going out. Signed-off-by: Keith Packard --- src/drivers/ao_cc1200.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/drivers/ao_cc1200.c b/src/drivers/ao_cc1200.c index 8f31d2b4..930680b2 100644 --- a/src/drivers/ao_cc1200.c +++ b/src/drivers/ao_cc1200.c @@ -28,8 +28,14 @@ static uint8_t ao_radio_abort; /* radio operation should abort */ int8_t ao_radio_rssi; /* Last received RSSI value */ +#ifndef CC1200_DEBUG #define CC1200_DEBUG 0 +#endif + +#ifndef CC1200_LOW_LEVEL_DEBUG #define CC1200_LOW_LEVEL_DEBUG 0 +#endif + #define CC1200_TRACE 0 #define CC1200_APRS_TRACE 0 @@ -742,6 +748,8 @@ ao_rdf_start(uint8_t len) static void ao_radio_run(void) { + ao_radio_wake = 0; + ao_radio_abort = 0; ao_radio_start_tx(); ao_radio_wait_isr(0); if (!ao_radio_wake) @@ -858,6 +866,7 @@ ao_radio_send_aprs(ao_radio_fill_func fill) uint8_t started = 0; uint8_t fifo_space; + ao_radio_abort = 0; ao_radio_get(0xff); fifo_space = CC1200_FIFO_SIZE; while (!done) { -- 2.30.2