diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-13 21:20:06 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-13 21:21:33 -0700 |
commit | b6083ce00867051d4d513b91519cad6e4a91f07b (patch) | |
tree | f3bde62074fc07aeca8be1f1f451a21f04f86767 /src-avr/ao.h | |
parent | 792c58fa9c316accfe6fff9f902b8a1e07e4cfed (diff) |
altos-avr: Add SPI-slave companion support
Listen on the SPI slave port for commands from TeleMetrum.
Run logging during flight, based on flight state.
Return recent data for telemetry.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src-avr/ao.h')
-rw-r--r-- | src-avr/ao.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src-avr/ao.h b/src-avr/ao.h index ecb33464..c548c618 100644 --- a/src-avr/ao.h +++ b/src-avr/ao.h @@ -1421,4 +1421,33 @@ ao_btm_init(void); void ao_debug_init(void); +/* ao_spi_slave.c */ + +void +ao_spi_slave_read(uint8_t *data, int len); + +void +ao_spi_slave_write(uint8_t *data, int len); + +void +ao_spi_slave_init(void); + +/* ao_companion.c */ + +#define AO_COMPANION_SETUP 1 +#define AO_COMPANION_FETCH 2 + +struct ao_companion_command { + uint8_t command; + uint8_t flight_state; + uint16_t tick; +}; + +struct ao_companion_setup { + uint16_t board_id; + uint16_t board_id_inverse; + uint8_t update_period; + uint8_t channels; +}; + #endif /* _AO_H_ */ |