diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-09 16:59:16 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-08-13 18:46:12 -0700 |
commit | 30abbdc7ffcfc809b4a3fc31486fe968161ea225 (patch) | |
tree | 5f7735943d8bc54e5f6a478e168aebc054b215d6 /src/ao_ee.c | |
parent | 578c4b17b8f62f2727654ebda78ee139f9fe13fa (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_ee.c')
-rw-r--r-- | src/ao_ee.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/ao_ee.c b/src/ao_ee.c index 83863af5..a2fe8dc1 100644 --- a/src/ao_ee.c +++ b/src/ao_ee.c @@ -49,19 +49,9 @@ static __xdata uint8_t ao_ee_mutex; _asm nop _endasm; \ } while(0) -static void ao_ee_cs_low(void) -{ - ao_ee_delay(); - EE_CS = 0; - ao_ee_delay(); -} +#define ao_ee_cs_low() ao_spi_get_bit(EE_CS) -static void ao_ee_cs_high(void) -{ - ao_ee_delay(); - EE_CS = 1; - ao_ee_delay(); -} +#define ao_ee_cs_high() ao_spi_put_bit(EE_CS) struct ao_ee_instruction { uint8_t instruction; |