From 30abbdc7ffcfc809b4a3fc31486fe968161ea225 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 9 Jul 2011 16:59:16 -0700 Subject: 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 --- src/ao_flash.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/ao_flash.c') diff --git a/src/ao_flash.c b/src/ao_flash.c index 00e96398..bb40f6f7 100644 --- a/src/ao_flash.c +++ b/src/ao_flash.c @@ -43,19 +43,9 @@ __xdata uint8_t ao_flash_mutex; _asm nop _endasm; \ } while(0) -void ao_flash_cs_low(void) -{ - ao_flash_delay(); - FLASH_CS = 0; - ao_flash_delay(); -} +#define ao_flash_cs_low() ao_spi_get_bit(FLASH_CS) -void ao_flash_cs_high(void) -{ - ao_flash_delay(); - FLASH_CS = 1; - ao_flash_delay(); -} +#define ao_flash_cs_high() ao_spi_put_bit(FLASH_CS) struct ao_flash_instruction { uint8_t instruction; -- cgit v1.2.3