summaryrefslogtreecommitdiff
path: root/src/ao_pins.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-09 16:59:16 -0700
committerKeith Packard <keithp@keithp.com>2011-08-13 18:46:12 -0700
commit30abbdc7ffcfc809b4a3fc31486fe968161ea225 (patch)
tree5f7735943d8bc54e5f6a478e168aebc054b215d6 /src/ao_pins.h
parent578c4b17b8f62f2727654ebda78ee139f9fe13fa (diff)
altos: Add SPI-based companion board support
This sends current flight state information and retrieves companion data to include in telemetry. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_pins.h')
-rw-r--r--src/ao_pins.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ao_pins.h b/src/ao_pins.h
index 89907b9c..e1f5459f 100644
--- a/src/ao_pins.h
+++ b/src/ao_pins.h
@@ -36,6 +36,11 @@
#define PACKET_HAS_MASTER 0
#define PACKET_HAS_SLAVE 1
+ #define HAS_COMPANION 1
+ #define COMPANION_CS_ON_P1 1
+ #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
+ #define COMPANION_CS P1_2
+
#define AO_LED_RED 1
#define LEDS_AVAILABLE (AO_LED_RED)
#define HAS_EXTERNAL_TEMP 0
@@ -63,6 +68,11 @@
#define PACKET_HAS_MASTER 0
#define PACKET_HAS_SLAVE 1
+ #define HAS_COMPANION 1
+ #define COMPANION_CS_ON_P1 1
+ #define COMPANION_CS_MASK 0x4 /* CS1 is P1_2 */
+ #define COMPANION_CS P1_2
+
#define AO_LED_RED 1
#define LEDS_AVAILABLE (AO_LED_RED)
#define HAS_EXTERNAL_TEMP 0
@@ -328,6 +338,12 @@
#endif /* DBG_ON_P0 */
+#if COMPANION_CS_ON_P1
+ #define COMPANION_CS_PORT P1
+ #define COMPANION_CS_SEL P1SEL
+ #define COMPANION_CS_DIR P1DIR
+#endif
+
#if SPI_CS_ON_P1
#define SPI_CS_PORT P1
#define SPI_CS_SEL P1SEL