summaryrefslogtreecommitdiff
path: root/src/megametrum-v0.1/ao_pins.h
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_pins.h
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_pins.h')
-rw-r--r--src/megametrum-v0.1/ao_pins.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index 083c1b6f..ab4cf7df 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -67,7 +67,7 @@
#define HAS_EEPROM 1
#define USE_INTERNAL_FLASH 0
#define HAS_USB 1
-#define HAS_BEEP 1
+#define HAS_BEEP 0
#define HAS_RADIO 1
#define HAS_TELEMETRY 1
#define HAS_APRS 1
@@ -282,11 +282,19 @@ struct ao_adc {
#define AO_CC1120_SPI_CS_PIN 5
#define AO_CC1120_SPI_BUS AO_SPI_2_PB13_PB14_PB15
-#define AO_CC1120_INT_PORT (&stm_gpioc)
-#define AO_CC1120_INT_PIN 14
+#define AO_CC1120_INT_PORT (&stm_gpioc)
+#define AO_CC1120_INT_PIN 14
+#define AO_CC1120_MCU_WAKEUP_PORT (&stm_gpioc)
+#define AO_CC1120_MCU_WAKEUP_PIN (0)
#define AO_CC1120_INT_GPIO 2
-#define HAS_BOOT_RADIO 1
+#define AO_CC1120_INT_GPIO_IOCFG CC1120_IOCFG2
+
+#define AO_CC1120_MARC_GPIO 3
+#define AO_CC1120_MARC_GPIO_IOCFG CC1120_IOCFG3
+
+
+#define HAS_BOOT_RADIO 0
/*
* Mag sensor (hmc5883)