summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1/ao_megametrum.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-12-16 16:04:05 -0800
committerKeith Packard <keithp@keithp.com>2012-12-16 16:04:05 -0800
commit22a58b0f9b82ea8c7abeda79ca7a4cd21c3dc93c (patch)
treeb7e3bae3670fc0e4b55571f3ea9abee48bf841ee /src/megametrum-v0.1/ao_megametrum.c
parent4e3ac3f2038cc3a43252fc8f820a1373a637ab83 (diff)
altos: Wire up another CC1120 GPIO to get MARC status changes
When the radio drops out of RX or TX mode due to an error, it changes the MARC status, and sends pulse down a configured GPIO. Use this to tell when something 'bad' happened during TX or RX so that we can recover from losing the SPI bus in the middle of transmission or reception. Without this, the radio would change state and we'd never know, leaving the radio code waiting for an interrupt that would never arrive. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/megametrum-v0.1/ao_megametrum.c')
-rw-r--r--src/megametrum-v0.1/ao_megametrum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/megametrum-v0.1/ao_megametrum.c b/src/megametrum-v0.1/ao_megametrum.c
index cb1eb417..fbdab64a 100644
--- a/src/megametrum-v0.1/ao_megametrum.c
+++ b/src/megametrum-v0.1/ao_megametrum.c
@@ -53,7 +53,9 @@ main(void)
ao_exti_init();
ao_adc_init();
+#if HAS_BEEP
ao_beep_init();
+#endif
ao_cmd_init();
#if HAS_MS5607