summaryrefslogtreecommitdiff
path: root/src/ao_radio.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-12-19 11:34:16 -0800
committerKeith Packard <keithp@keithp.com>2009-12-19 11:35:35 -0800
commit10d1bbcd9709a5eee8d50989215242b16feb7232 (patch)
tree7de1577d347a3bb7d58208d3a7b973c860b16264 /src/ao_radio.c
parenta15abc1882a3bdd2c980eed169f3b80337528390 (diff)
Use ao_radio_get/ao_radio_put in packet code.
The ao_radio_get function both acquires the mutex *and* configures the radio channel and frequency. Failing to use this in the packet code would leave the radio frequency unconfigured. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_radio.c')
-rw-r--r--src/ao_radio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ao_radio.c b/src/ao_radio.c
index 4dea6dce..1a0cf4fa 100644
--- a/src/ao_radio.c
+++ b/src/ao_radio.c
@@ -324,7 +324,7 @@ ao_radio_idle(void)
}
}
-static void
+void
ao_radio_get(void)
{
ao_config_get();
@@ -336,7 +336,6 @@ ao_radio_get(void)
RF_FREQ0 = (uint8_t) (ao_config.radio_cal);
}
-#define ao_radio_put() ao_mutex_put(&ao_radio_mutex)
void
ao_radio_send(__xdata struct ao_telemetry *telemetry) __reentrant