summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-11-06 20:04:47 -0800
committerKeith Packard <keithp@keithp.com>2014-11-06 20:04:47 -0800
commit437eba2ff27b2b7dfd0f363819b9a43ab8b28ead (patch)
tree7cad6cf47ddcde8dfee199b31219386399f63c63
parent7f742824673e5e6034defdb09b66d4d56eb8d4fe (diff)
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 <keithp@keithp.com>
-rw-r--r--src/drivers/ao_cc1200.c9
1 files changed, 9 insertions, 0 deletions
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) {