From 5e24d637a8af09bf64beb7fcf7be4c13eee76a43 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 9 Oct 2016 19:42:42 -0700 Subject: altos/test: Fix tests A couple of fixups for ao_flight_test to dump pyro info only when running in debug mode, and to change the aprs testing Signed-off-by: Keith Packard --- src/kernel/ao_pyro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index c9920ab3..b11d1080 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -75,7 +75,8 @@ uint16_t ao_pyro_fired; #endif #if PYRO_DBG -#define DBG(...) do { printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); } while (0) +int pyro_dbg; +#define DBG(...) do { if (pyro_dbg) printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); } while (0) #else #define DBG(...) #endif -- cgit v1.2.3 From 89ecc32b90565ace078c4a84d4406a4d1f86821a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 17 Dec 2016 20:58:36 -0800 Subject: altos/arm: Align data so that gcc 5.4 doesn't do byte-accesses. Add -Wcast-align Gcc 5.4.1 tracks alignment of data through assignments, so that a uint32_t pointer which comes from byte-aligned uint8_t data: extern uint8_t foo[]; uint32_t *q = (void *) foo; Fetches and stores through this pointer are done bytewise. This is slow (meh), but if q references a device register, things to bad very quickly. This patch works around this bug in the compiler by adding __attribute__((aligned(4))) tags to some variables, or changing them from uint8_t to uint32_t. Places doing this will now be caught as I've added -Wcast-align to the compiler flags. That required adding (void *) casts, after the relevant code was checked to make sure the compiler could tell that the addresses were aligned. Signed-off-by: Keith Packard --- src/aes/ao_aes.c | 9 +++++---- src/drivers/ao_gps_ublox.c | 4 ++-- src/drivers/ao_trng_send.c | 2 +- src/kernel/ao_list.h | 2 +- src/kernel/ao_pyro.c | 4 ++-- src/kernel/ao_task.h | 13 ++++++++++++- src/stm/Makefile.defs | 2 +- src/stm/ao_arch_funcs.h | 9 ++------- src/stm/ao_eeprom_stm.c | 4 ++-- src/stm/ao_usb_stm.c | 2 +- src/stm/stm32l.h | 2 +- src/stmf0/Makefile-stmf0.defs | 2 +- src/stmf0/ao_adc_fast.h | 2 +- src/stmf0/ao_arch_funcs.h | 2 +- src/stmf0/ao_usb_stm.c | 2 +- src/stmf0/stm32f0.h | 2 +- 16 files changed, 35 insertions(+), 28 deletions(-) (limited to 'src/kernel') diff --git a/src/aes/ao_aes.c b/src/aes/ao_aes.c index a04174c6..fd90c5bf 100644 --- a/src/aes/ao_aes.c +++ b/src/aes/ao_aes.c @@ -359,10 +359,10 @@ void xrijndaelDecrypt(word32 block[], roundkey *rkk) #endif uint8_t ao_aes_mutex; -static uint8_t key[16]; +static word32 key[16/4]; static roundkey rkk; -static uint8_t iv[16]; +static word32 iv[16/4]; void ao_aes_set_mode(enum ao_aes_mode mode) @@ -389,10 +389,11 @@ ao_aes_run(__xdata uint8_t *in, __xdata uint8_t *out) { uint8_t i; + uint8_t *_iv = (uint8_t *) iv; for (i = 0; i < 16; i++) - iv[i] ^= in[i]; - xrijndaelEncrypt((word32 *) iv, &rkk); + _iv[i] ^= in[i]; + xrijndaelEncrypt(iv, &rkk); if (out) memcpy(out, iv, 16); } diff --git a/src/drivers/ao_gps_ublox.c b/src/drivers/ao_gps_ublox.c index 22af413a..c720f802 100644 --- a/src/drivers/ao_gps_ublox.c +++ b/src/drivers/ao_gps_ublox.c @@ -156,7 +156,7 @@ static char __xdata *ublox_target; static void ublox_u16(uint8_t offset) { - uint16_t __xdata *ptr = (uint16_t __xdata *) (ublox_target + offset); + uint16_t __xdata *ptr = (uint16_t __xdata *) (void __xdata *) (ublox_target + offset); uint16_t val; val = data_byte(); @@ -175,7 +175,7 @@ static void ublox_u8(uint8_t offset) static void ublox_u32(uint8_t offset) __reentrant { - uint32_t __xdata *ptr = (uint32_t __xdata *) (ublox_target + offset); + uint32_t __xdata *ptr = (uint32_t __xdata *) (void __xdata *) (ublox_target + offset); uint32_t val; val = ((uint32_t) data_byte ()); diff --git a/src/drivers/ao_trng_send.c b/src/drivers/ao_trng_send.c index 85034efd..b1227aaa 100644 --- a/src/drivers/ao_trng_send.c +++ b/src/drivers/ao_trng_send.c @@ -104,7 +104,7 @@ ao_trng_get_cooked(uint16_t *buf) { uint16_t i; uint16_t t; - uint32_t *rnd = (uint32_t *) ao_adc_ring; + uint32_t *rnd = (uint32_t *) (void *) ao_adc_ring; uint8_t mismatch = 0; t = ao_adc_get(AO_USB_IN_SIZE) >> 1; /* one 16-bit value per output byte */ diff --git a/src/kernel/ao_list.h b/src/kernel/ao_list.h index e2df6885..45a3df5b 100644 --- a/src/kernel/ao_list.h +++ b/src/kernel/ao_list.h @@ -138,7 +138,7 @@ ao_list_is_empty(struct ao_list *head) * @return A pointer to the data struct containing the list head. */ #define ao_container_of(ptr, type, member) \ - ((type *)((char *)(ptr) - offsetof(type, member))) + ((type *)((void *) ((char *)(ptr) - offsetof(type, member)))) /** * Alias of ao_container_of diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index b11d1080..a0881f9e 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -438,7 +438,7 @@ ao_pyro_show(void) if (ao_pyro_values[v].flag & AO_PYRO_8_BIT_VALUE) value = *((uint8_t *) ((char *) pyro + ao_pyro_values[v].offset)); else - value = *((int16_t *) ((char *) pyro + ao_pyro_values[v].offset)); + value = *((int16_t *) (void *) ((char *) pyro + ao_pyro_values[v].offset)); printf ("%6d ", value); } else { printf (" "); @@ -517,7 +517,7 @@ ao_pyro_set(void) } else { if (negative) ao_cmd_lex_i = -ao_cmd_lex_i; - *((int16_t *) ((char *) &pyro_tmp + ao_pyro_values[v].offset)) = ao_cmd_lex_i; + *((int16_t *) (void *) ((char *) &pyro_tmp + ao_pyro_values[v].offset)) = ao_cmd_lex_i; } } } diff --git a/src/kernel/ao_task.h b/src/kernel/ao_task.h index f1dbd654..30b018ff 100644 --- a/src/kernel/ao_task.h +++ b/src/kernel/ao_task.h @@ -26,6 +26,17 @@ #define HAS_TASK_INFO 1 #endif +/* arm stacks must be 32-bit aligned */ +#ifdef __arm__ +#define AO_STACK_ALIGNMENT __attribute__ ((aligned(4))) +#endif +#ifdef SDCC +#define AO_STACK_ALIGNMENT +#endif +#ifdef __AVR__ +#define AO_STACK_ALIGNMENT +#endif + /* An AltOS task */ struct ao_task { __xdata void *wchan; /* current wait channel (NULL if running) */ @@ -37,7 +48,7 @@ struct ao_task { struct ao_list queue; struct ao_list alarm_queue; #endif - uint8_t stack[AO_STACK_SIZE]; /* saved stack */ + uint8_t stack[AO_STACK_SIZE] AO_STACK_ALIGNMENT; /* saved stack */ #if HAS_SAMPLE_PROFILE uint32_t ticks; uint32_t yields; diff --git a/src/stm/Makefile.defs b/src/stm/Makefile.defs index c3d2707f..0ba86f5a 100644 --- a/src/stm/Makefile.defs +++ b/src/stm/Makefile.defs @@ -27,7 +27,7 @@ LIBS=$(PDCLIB_LIBS_M3) -lgcc WARN_FLAGS=-Wall -Wextra -Werror AO_CFLAGS=-I. -I../stm -I../kernel -I../drivers -I../math -I.. $(PDCLIB_INCLUDES) -STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb \ +STM_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m3 -mthumb -Wcast-align \ -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) LDFLAGS=-L../stm -Wl,-Taltos.ld diff --git a/src/stm/ao_arch_funcs.h b/src/stm/ao_arch_funcs.h index 18ca20da..a9d0fa34 100644 --- a/src/stm/ao_arch_funcs.h +++ b/src/stm/ao_arch_funcs.h @@ -375,7 +375,7 @@ ao_arch_irq_check(void) { static inline void ao_arch_init_stack(struct ao_task *task, void *start) { - uint32_t *sp = (uint32_t *) (task->stack + AO_STACK_SIZE); + uint32_t *sp = (uint32_t *) ((void*) task->stack + AO_STACK_SIZE); uint32_t a = (uint32_t) start; int i; @@ -413,16 +413,11 @@ static inline void ao_arch_save_stack(void) { uint32_t *sp; asm("mov %0,sp" : "=&r" (sp) ); ao_cur_task->sp = (sp); - if ((uint8_t *) sp < &ao_cur_task->stack[0]) - ao_panic (AO_PANIC_STACK); } static inline void ao_arch_restore_stack(void) { - uint32_t sp; - sp = (uint32_t) ao_cur_task->sp; - /* Switch stacks */ - asm("mov sp, %0" : : "r" (sp) ); + asm("mov sp, %0" : : "r" (ao_cur_task->sp) ); /* Restore PRIMASK */ asm("pop {r0}"); diff --git a/src/stm/ao_eeprom_stm.c b/src/stm/ao_eeprom_stm.c index 05f880b8..4f477122 100644 --- a/src/stm/ao_eeprom_stm.c +++ b/src/stm/ao_eeprom_stm.c @@ -83,7 +83,7 @@ ao_intflash_write32(uint16_t pos, uint32_t w) { volatile uint32_t *addr; - addr = (uint32_t *) (stm_eeprom + pos); + addr = (uint32_t *) (void *) (stm_eeprom + pos); /* Write a word to a valid address in the data EEPROM */ *addr = w; @@ -96,7 +96,7 @@ ao_intflash_write8(uint16_t pos, uint8_t d) uint32_t w, *addr, mask; uint8_t shift; - addr = (uint32_t *) (stm_eeprom + (pos & ~3)); + addr = (uint32_t *) (void *) (stm_eeprom + (pos & ~3)); /* Compute word to be written */ shift = (pos & 3) << 3; diff --git a/src/stm/ao_usb_stm.c b/src/stm/ao_usb_stm.c index f2b8ea94..9d72844e 100644 --- a/src/stm/ao_usb_stm.c +++ b/src/stm/ao_usb_stm.c @@ -139,7 +139,7 @@ static inline uint32_t set_toggle(uint32_t current_value, static inline uint32_t *ao_usb_packet_buffer_addr(uint16_t sram_addr) { - return (uint32_t *) (stm_usb_sram + 2 * sram_addr); + return (uint32_t *) (((void *) ((uint8_t *) stm_usb_sram + 2 * sram_addr))); } static inline uint32_t ao_usb_epr_stat_rx(uint32_t epr) { diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index 463125e2..be1e1d65 100644 --- a/src/stm/stm32l.h +++ b/src/stm/stm32l.h @@ -1961,7 +1961,7 @@ union stm_usb_bdt { #define STM_USB_BDT_SIZE 8 -extern uint8_t stm_usb_sram[]; +extern uint8_t stm_usb_sram[] __attribute__ ((aligned(4))); struct stm_exti { vuint32_t imr; diff --git a/src/stmf0/Makefile-stmf0.defs b/src/stmf0/Makefile-stmf0.defs index 4862f46e..f3296b69 100644 --- a/src/stmf0/Makefile-stmf0.defs +++ b/src/stmf0/Makefile-stmf0.defs @@ -25,7 +25,7 @@ endif ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex CC=$(ARM_CC) -WARN_FLAGS=-Wall -Wextra -Werror +WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align AO_CFLAGS=-I. -I$(TOPDIR)/stmf0 -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math $(PDCLIB_INCLUDES) STMF0_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\ diff --git a/src/stmf0/ao_adc_fast.h b/src/stmf0/ao_adc_fast.h index b8b5e003..3f0b0547 100644 --- a/src/stmf0/ao_adc_fast.h +++ b/src/stmf0/ao_adc_fast.h @@ -28,7 +28,7 @@ ao_adc_init(void); /* Total ring size in samples */ #define AO_ADC_RING_SIZE 256 -extern uint16_t ao_adc_ring[AO_ADC_RING_SIZE]; +extern uint16_t ao_adc_ring[AO_ADC_RING_SIZE] __attribute__((aligned(4))); #define ao_adc_ring_step(pos,inc) (((pos) + (inc)) & (AO_ADC_RING_SIZE - 1)) diff --git a/src/stmf0/ao_arch_funcs.h b/src/stmf0/ao_arch_funcs.h index d35bafbd..c38ce41a 100644 --- a/src/stmf0/ao_arch_funcs.h +++ b/src/stmf0/ao_arch_funcs.h @@ -366,7 +366,7 @@ ao_arch_memory_barrier() { static inline void ao_arch_init_stack(struct ao_task *task, void *start) { - uint32_t *sp = (uint32_t *) (task->stack + AO_STACK_SIZE); + uint32_t *sp = (uint32_t *) ((void *) task->stack + AO_STACK_SIZE); uint32_t a = (uint32_t) start; int i; diff --git a/src/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c index cbedb996..652b3b6c 100644 --- a/src/stmf0/ao_usb_stm.c +++ b/src/stmf0/ao_usb_stm.c @@ -185,7 +185,7 @@ static inline uint32_t set_toggle(uint32_t current_value, static inline uint16_t *ao_usb_packet_buffer_addr(uint16_t sram_addr) { - return (uint16_t *) (stm_usb_sram + sram_addr); + return (uint16_t *) (void *) (stm_usb_sram + sram_addr); } static inline uint16_t ao_usb_packet_buffer_offset(uint16_t *addr) diff --git a/src/stmf0/stm32f0.h b/src/stmf0/stm32f0.h index 182cd963..1c33f020 100644 --- a/src/stmf0/stm32f0.h +++ b/src/stmf0/stm32f0.h @@ -1996,7 +1996,7 @@ union stm_usb_bdt { #define STM_USB_BDT_SIZE 8 -extern uint8_t stm_usb_sram[]; +extern uint8_t stm_usb_sram[] __attribute__((aligned(4))); struct stm_exti { vuint32_t imr; -- cgit v1.2.3 From caba623cb013b73e1f0ca369edf98e0376bec41a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 2 Nov 2016 14:14:23 -0700 Subject: altos/kernel: Make ao_cmd_readline public. Return char from ao_cmd_lex. With these two changes, the readline function can be used by other code. Signed-off-by: Keith Packard --- src/kernel/ao.h | 3 +++ src/kernel/ao_cmd.c | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ao.h b/src/kernel/ao.h index fb41d7a9..9ab7991b 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -170,6 +170,9 @@ void ao_put_string(__code char *s); void +ao_cmd_readline(void); + +char ao_cmd_lex(void); void diff --git a/src/kernel/ao_cmd.c b/src/kernel/ao_cmd.c index 10716afd..077d7de1 100644 --- a/src/kernel/ao_cmd.c +++ b/src/kernel/ao_cmd.c @@ -24,13 +24,15 @@ __pdata uint32_t ao_cmd_lex_u32; __pdata char ao_cmd_lex_c; __pdata enum ao_cmd_status ao_cmd_status; +#ifndef AO_CMD_LEN #if AO_PYRO_NUM -#define CMD_LEN 128 +#define AO_CMD_LEN 128 #else -#define CMD_LEN 48 +#define AO_CMD_LEN 48 +#endif #endif -static __xdata char cmd_line[CMD_LEN]; +static __xdata char cmd_line[AO_CMD_LEN]; static __pdata uint8_t cmd_len; static __pdata uint8_t cmd_i; @@ -48,8 +50,8 @@ backspace(void) ao_put_string ("\010 \010"); } -static void -readline(void) +void +ao_cmd_readline(void) { char c; if (ao_echo()) @@ -88,7 +90,7 @@ readline(void) break; } - if (cmd_len >= CMD_LEN - 2) + if (cmd_len >= AO_CMD_LEN - 2) continue; cmd_line[cmd_len++] = c; if (ao_echo()) @@ -99,12 +101,13 @@ readline(void) cmd_i = 0; } -void +char ao_cmd_lex(void) { ao_cmd_lex_c = '\n'; if (cmd_i < cmd_len) ao_cmd_lex_c = cmd_line[cmd_i++]; + return ao_cmd_lex_c; } static void @@ -376,7 +379,7 @@ ao_cmd(void) void (*__xdata func)(void); for (;;) { - readline(); + ao_cmd_readline(); ao_cmd_lex(); ao_cmd_white(); c = ao_cmd_lex_c; -- cgit v1.2.3 From 51edc29f5ba758ef8ba4fdd5f53fdabc6a31c98a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 28 Jan 2017 15:33:53 -0800 Subject: altos: Eliminate printf format warning with long vs int Signed-off-by: Keith Packard --- src/kernel/ao_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_cmd.c b/src/kernel/ao_cmd.c index 077d7de1..881f3500 100644 --- a/src/kernel/ao_cmd.c +++ b/src/kernel/ao_cmd.c @@ -310,7 +310,7 @@ version(void) #endif #endif #if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND) - , (uint32_t) AO_BOOT_APPLICATION_BOUND - (uint32_t) AO_BOOT_APPLICATION_BASE + , (unsigned) ((uint32_t) AO_BOOT_APPLICATION_BOUND - (uint32_t) AO_BOOT_APPLICATION_BASE) #endif ); printf("software-version %s\n", ao_version); -- cgit v1.2.3 From 0bf267a6e2d401c8bd6a06d995e3d000777d622a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 18 Feb 2017 22:55:41 -0800 Subject: altos: Allow applications to define LEDs for ao_report.c In case they don't have both a red and green LED. Signed-off-by: Keith Packard --- src/kernel/ao_report.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_report.c b/src/kernel/ao_report.c index 6592d616..af48b390 100644 --- a/src/kernel/ao_report.c +++ b/src/kernel/ao_report.c @@ -45,9 +45,16 @@ static const uint8_t flight_reports[] = { #define mid(time) ao_beep_for(AO_BEEP_MID, time) #define high(time) ao_beep_for(AO_BEEP_HIGH, time) #else -#define low(time) ao_led_for(AO_LED_GREEN, time) -#define mid(time) ao_led_for(AO_LED_RED, time) -#define high(time) ao_led_for(AO_LED_GREEN|AO_LED_RED, time) +#ifndef AO_LED_LOW +#define AO_LED_LOW AO_LED_GREEN +#endif +#ifndef AO_LED_MID +#define AO_LED_MID AO_LED_RED +#endif + +#define low(time) ao_led_for(AO_LED_LOW, time) +#define mid(time) ao_led_for(AO_LED_MID, time) +#define high(time) ao_led_for(AO_LED_MID|AO_LED_LOW, time) #endif #define pause(time) ao_delay(time) -- cgit v1.2.3 From 59ac667c4ae14e0fa699fb0f398d31763a237646 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 19 Feb 2017 17:39:21 -0800 Subject: altos: Split out TeleMini v3 log/telem labeling Allow the ground software to know which TeleMini version is in use, even though they are very similar with only ADC values differing. Signed-off-by: Keith Packard --- src/kernel/ao_log.h | 3 ++- src/kernel/ao_telemetry.c | 2 +- src/kernel/ao_telemetry.h | 3 ++- src/telemini-v2.0/ao_pins.h | 4 ++-- src/telemini-v3.0/ao_pins.h | 4 +++- 5 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_log.h b/src/kernel/ao_log.h index 13eb05bf..ad28e5ca 100644 --- a/src/kernel/ao_log.h +++ b/src/kernel/ao_log.h @@ -47,10 +47,11 @@ extern __pdata enum ao_flight_state ao_log_state; #define AO_LOG_FORMAT_TELEMEGA_OLD 5 /* 32 byte typed telemega records */ #define AO_LOG_FORMAT_EASYMINI 6 /* 16-byte MS5607 baro only, 3.0V supply */ #define AO_LOG_FORMAT_TELEMETRUM 7 /* 16-byte typed telemetrum records */ -#define AO_LOG_FORMAT_TELEMINI 8 /* 16-byte MS5607 baro only, 3.3V supply */ +#define AO_LOG_FORMAT_TELEMINI2 8 /* 16-byte MS5607 baro only, 3.3V supply, cc1111 SoC */ #define AO_LOG_FORMAT_TELEGPS 9 /* 32 byte telegps records */ #define AO_LOG_FORMAT_TELEMEGA 10 /* 32 byte typed telemega records with 32 bit gyro cal */ #define AO_LOG_FORMAT_DETHERM 11 /* 16-byte MS5607 baro only, no ADC */ +#define AO_LOG_FORMAT_TELEMINI3 12 /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */ #define AO_LOG_FORMAT_NONE 127 /* No log at all */ extern __code uint8_t ao_log_format; diff --git a/src/kernel/ao_telemetry.c b/src/kernel/ao_telemetry.c index 15085bf4..fa817824 100644 --- a/src/kernel/ao_telemetry.c +++ b/src/kernel/ao_telemetry.c @@ -270,7 +270,7 @@ ao_send_mini(void) __xdata struct ao_data *packet = (__xdata struct ao_data *) &ao_data_ring[ao_data_ring_prev(ao_sample_data)]; telemetry.generic.tick = packet->tick; - telemetry.generic.type = AO_TELEMETRY_MINI; + telemetry.generic.type = AO_SEND_MINI; telemetry.mini.state = ao_flight_state; diff --git a/src/kernel/ao_telemetry.h b/src/kernel/ao_telemetry.h index c0f5e3c5..45aaeb07 100644 --- a/src/kernel/ao_telemetry.h +++ b/src/kernel/ao_telemetry.h @@ -270,7 +270,8 @@ struct ao_telemetry_metrum_data { /* 32 */ }; -#define AO_TELEMETRY_MINI 0x10 +#define AO_TELEMETRY_MINI2 0x10 /* CC1111 based */ +#define AO_TELEMETRY_MINI3 0x11 /* STMF042 based */ struct ao_telemetry_mini { uint16_t serial; /* 0 */ diff --git a/src/telemini-v2.0/ao_pins.h b/src/telemini-v2.0/ao_pins.h index 4f1d36df..d2aa4c2d 100644 --- a/src/telemini-v2.0/ao_pins.h +++ b/src/telemini-v2.0/ao_pins.h @@ -115,8 +115,8 @@ #define AO_IGNITER_FIRE_TIME AO_MS_TO_TICKS(50) #define AO_IGNITER_CHARGE_TIME AO_MS_TO_TICKS(2000) -#define AO_SEND_MINI -#define AO_LOG_FORMAT AO_LOG_FORMAT_TELEMINI +#define AO_SEND_MINI AO_TELEMETRY_MINI2 +#define AO_LOG_FORMAT AO_LOG_FORMAT_TELEMINI2 /* * ADC diff --git a/src/telemini-v3.0/ao_pins.h b/src/telemini-v3.0/ao_pins.h index 031c1d18..b4f2a630 100644 --- a/src/telemini-v3.0/ao_pins.h +++ b/src/telemini-v3.0/ao_pins.h @@ -48,7 +48,8 @@ #define PACKET_HAS_SLAVE 1 -#define AO_LOG_FORMAT AO_LOG_FORMAT_EASYMINI +#define AO_LOG_FORMAT AO_LOG_FORMAT_TELEMINI3 +#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX ((uint32_t) 112 * (uint32_t) 1024) #define HAS_BOOT_RADIO 0 @@ -59,6 +60,7 @@ #define HAS_FLIGHT 1 #define HAS_EEPROM 1 #define HAS_TELEMETRY 1 +#define AO_SEND_MINI AO_TELEMETRY_MINI3 #define HAS_APRS 0 #define HAS_LOG 1 #define USE_INTERNAL_FLASH 0 -- cgit v1.2.3 From 992eee8e0b4c6c774f3355af107fb422019ff4e5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 20 Nov 2016 20:56:01 -0800 Subject: altos: Don't wait while idle if trying to minimize interrupt latency Keeping the scanout running reasonably means keeping interrupt latency constant, and that requires leaving the CPU running. Don't wait for interrupts when the system is running in this mode. Signed-off-by: Keith Packard --- src/kernel/ao_task.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_task.c b/src/kernel/ao_task.c index e8a092aa..de23ea02 100644 --- a/src/kernel/ao_task.c +++ b/src/kernel/ao_task.c @@ -373,7 +373,11 @@ ao_yield(void) ao_arch_naked_define if (!ao_list_is_empty(&run_queue)) break; /* Wait for interrupts when there's nothing ready */ - ao_arch_wait_interrupt(); + if (ao_task_minimize_latency) { + ao_arch_release_interrupts(); + ao_arch_block_interrupts(); + } else + ao_arch_wait_interrupt(); } ao_cur_task = ao_list_first_entry(&run_queue, struct ao_task, queue); #else -- cgit v1.2.3 From 5dc5e2e238f8c1a8ca35d85ec046124afa9385ad Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 10 Jan 2017 14:45:25 -0800 Subject: altos: Allow for console to be used for stdio Signed-off-by: Keith Packard --- src/kernel/ao_stdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_stdio.c b/src/kernel/ao_stdio.c index b79d465a..f0ee0a14 100644 --- a/src/kernel/ao_stdio.c +++ b/src/kernel/ao_stdio.c @@ -55,6 +55,9 @@ #ifndef PACKET_HAS_SLAVE #define PACKET_HAS_SLAVE 0 #endif +#ifndef CONSOLE_STDIN +#define CONSOLE_STDIN 0 +#endif #define USE_SERIAL_STDIN (USE_SERIAL_0_STDIN + \ USE_SERIAL_1_STDIN + \ @@ -67,7 +70,7 @@ USE_SERIAL_8_STDIN + \ USE_SERIAL_9_STDIN) -#define AO_NUM_STDIOS (HAS_USB + PACKET_HAS_SLAVE + USE_SERIAL_STDIN) +#define AO_NUM_STDIOS (HAS_USB + PACKET_HAS_SLAVE + USE_SERIAL_STDIN + CONSOLE_STDIN) __xdata struct ao_stdio ao_stdios[AO_NUM_STDIOS]; -- cgit v1.2.3 From 359e2d6eca5258f4fabc59772f1320e195a7397c Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 22 Apr 2017 16:36:18 -0600 Subject: fleshing out logging for telefiretwo --- src/kernel/ao_log.h | 27 ++++++++ src/kernel/ao_log_firetwo.c | 155 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 src/kernel/ao_log_firetwo.c (limited to 'src/kernel') diff --git a/src/kernel/ao_log.h b/src/kernel/ao_log.h index ad28e5ca..a2f2c6ca 100644 --- a/src/kernel/ao_log.h +++ b/src/kernel/ao_log.h @@ -52,6 +52,7 @@ extern __pdata enum ao_flight_state ao_log_state; #define AO_LOG_FORMAT_TELEMEGA 10 /* 32 byte typed telemega records with 32 bit gyro cal */ #define AO_LOG_FORMAT_DETHERM 11 /* 16-byte MS5607 baro only, no ADC */ #define AO_LOG_FORMAT_TELEMINI3 12 /* 16-byte MS5607 baro only, 3.3V supply, stm32f042 SoC */ +#define AO_LOG_FORMAT_TELEFIRETWO 13 /* 32-byte test stand data */ #define AO_LOG_FORMAT_NONE 127 /* No log at all */ extern __code uint8_t ao_log_format; @@ -300,6 +301,32 @@ struct ao_log_mega { ((l)->u.gps.altitude_high = (a) >> 16), \ (l)->u.gps.altitude_low = (a)) +struct ao_log_firetwo { + char type; /* 0 */ + uint8_t csum; /* 1 */ + uint16_t tick; /* 2 */ + union { /* 4 */ + /* AO_LOG_FLIGHT */ + struct { + uint16_t flight; /* 4 */ + uint16_t idle_pressure; /* 6 */ + uint16_t idle_thrust; /* 8 */ + } flight; /* 16 */ + /* AO_LOG_STATE */ + struct { + uint16_t state; /* 4 */ + uint16_t reason; /* 6 */ + } state; /* 8 */ + /* AO_LOG_SENSOR */ + struct { + uint16_t pressure; /* 4 */ + uint16_t thrust; /* 6 */ + uint16_t thermistor[4]; /* 8 */ + } sensor; /* 24 */ + uint8_t align[28]; /* 4 */ + } u; /* 32 */ +}; + struct ao_log_metrum { char type; /* 0 */ uint8_t csum; /* 1 */ diff --git a/src/kernel/ao_log_firetwo.c b/src/kernel/ao_log_firetwo.c new file mode 100644 index 00000000..71e84dfe --- /dev/null +++ b/src/kernel/ao_log_firetwo.c @@ -0,0 +1,155 @@ +/* + * Copyright © 2017 Bdale Garbee + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include "ao.h" +#include +#include +#include + +static __xdata struct ao_log_firetwo log; + +__code uint8_t ao_log_format = AO_LOG_FORMAT_TELEFIRETWO; + +static uint8_t +ao_log_csum(__xdata uint8_t *b) __reentrant +{ + uint8_t sum = 0x5a; + uint8_t i; + + for (i = 0; i < sizeof (struct ao_log_firetwo); i++) + sum += *b++; + return -sum; +} + +uint8_t +ao_log_firetwo(__xdata struct ao_log_firetwo *log) __reentrant +{ + uint8_t wrote = 0; + /* set checksum */ + log->csum = 0; + log->csum = ao_log_csum((__xdata uint8_t *) log); + ao_mutex_get(&ao_log_mutex); { + if (ao_log_current_pos >= ao_log_end_pos && ao_log_running) + ao_log_stop(); + if (ao_log_running) { + wrote = 1; + ao_storage_write(ao_log_current_pos, + log, + sizeof (struct ao_log_firetwo)); + ao_log_current_pos += sizeof (struct ao_log_firetwo); + } + } ao_mutex_put(&ao_log_mutex); + return wrote; +} + +static uint8_t +ao_log_dump_check_data(void) +{ + if (ao_log_csum((uint8_t *) &log) != 0) + return 0; + return 1; +} + +#if HAS_ADC +static __data uint8_t ao_log_data_pos; + +/* a hack to make sure that ao_log_metrums fill the eeprom block in even units */ +typedef uint8_t check_log_size[1-(256 % sizeof(struct ao_log_firetwo))] ; +#endif + +void +ao_log(void) +{ + __pdata uint16_t next_sensor, next_other; + + ao_storage_setup(); + + ao_log_scan(); + + while (!ao_log_running) + ao_sleep(&ao_log_running); + +#if HAS_FLIGHT + log.type = AO_LOG_FLIGHT; + log.tick = ao_sample_tick; + log.u.flight.idle_pressure = ao_idle_pressure; + log.u.flight.idle_thrust = ao_idle_thrust; + log.u.flight.flight = ao_flight_number; + ao_log_firetwo(&log); +#endif + + /* Write the whole contents of the ring to the log + * when starting up. + */ + ao_log_data_pos = ao_data_ring_next(ao_data_head); + next_other = next_sensor = ao_data_ring[ao_log_data_pos].tick; + ao_log_state = ao_flight_startup; + for (;;) { + /* Write samples to EEPROM */ + while (ao_log_data_pos != ao_data_head) { + log.tick = ao_data_ring[ao_log_data_pos].tick; + if ((int16_t) (log.tick - next_sensor) >= 0) { + log.type = AO_LOG_SENSOR; + log.u.sensor.pressure = ao_data_ring[ao_log_data_pos].sensor.pressure; + log.u.sensor.thrust = ao_data_ring[ao_log_data_pos].sensor.thrust; + for (i = 0; i < 4; i++) { + log.u.sensor.thermistor[i] = ao_data_ring[ao_log_data_pos].sensor.thermistor[i]; + } + ao_log_firetwo(&log); + } + ao_log_data_pos = ao_data_ring_next(ao_log_data_pos); + } +#if HAS_FLIGHT + /* Write state change to EEPROM */ + if (ao_flight_state != ao_log_state) { + ao_log_state = ao_flight_state; + log.type = AO_LOG_STATE; + log.tick = ao_time(); + log.u.state.state = ao_log_state; + log.u.state.reason = 0; + ao_log_firetwo(&log); + + if (ao_log_state == ao_flight_landed) + ao_log_stop(); + } +#endif + + ao_log_flush(); + + /* Wait for a while */ + ao_delay(AO_MS_TO_TICKS(100)); + + /* Stop logging when told to */ + while (!ao_log_running) + ao_sleep(&ao_log_running); + } +} +#endif + +uint16_t +ao_log_flight(uint8_t slot) +{ + if (!ao_storage_read(ao_log_pos(slot), + &log, + sizeof (struct ao_log_firetwo))) + return 0; + + if (ao_log_dump_check_data() && log.type == AO_LOG_FLIGHT) + return log.u.flight.flight; + return 0; +} -- cgit v1.2.3 From db12c17e9538bd82f2c2bf21357887ee7d894a1c Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sat, 22 Apr 2017 16:59:03 -0600 Subject: a stab at turning on rudimentary logging for telefiretwo --- src/kernel/ao_log_firetwo.c | 28 +++++++++++----------------- src/telefiretwo-v1.0/Makefile | 5 ++++- src/telefiretwo-v1.0/ao_pins.h | 2 ++ 3 files changed, 17 insertions(+), 18 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_log_firetwo.c b/src/kernel/ao_log_firetwo.c index 71e84dfe..46559206 100644 --- a/src/kernel/ao_log_firetwo.c +++ b/src/kernel/ao_log_firetwo.c @@ -75,7 +75,9 @@ typedef uint8_t check_log_size[1-(256 % sizeof(struct ao_log_firetwo))] ; void ao_log(void) { - __pdata uint16_t next_sensor, next_other; + uint16_t ao_idle_pressure = 0; // write code to capture pre-test values someday + uint16_t ao_idle_thrust = 0; + uint16_t ao_flight_state = ao_flight_startup; ao_storage_setup(); @@ -84,37 +86,31 @@ ao_log(void) while (!ao_log_running) ao_sleep(&ao_log_running); -#if HAS_FLIGHT log.type = AO_LOG_FLIGHT; - log.tick = ao_sample_tick; + log.tick = ao_time(); log.u.flight.idle_pressure = ao_idle_pressure; log.u.flight.idle_thrust = ao_idle_thrust; log.u.flight.flight = ao_flight_number; ao_log_firetwo(&log); -#endif /* Write the whole contents of the ring to the log * when starting up. */ ao_log_data_pos = ao_data_ring_next(ao_data_head); - next_other = next_sensor = ao_data_ring[ao_log_data_pos].tick; ao_log_state = ao_flight_startup; for (;;) { /* Write samples to EEPROM */ while (ao_log_data_pos != ao_data_head) { log.tick = ao_data_ring[ao_log_data_pos].tick; - if ((int16_t) (log.tick - next_sensor) >= 0) { - log.type = AO_LOG_SENSOR; - log.u.sensor.pressure = ao_data_ring[ao_log_data_pos].sensor.pressure; - log.u.sensor.thrust = ao_data_ring[ao_log_data_pos].sensor.thrust; - for (i = 0; i < 4; i++) { - log.u.sensor.thermistor[i] = ao_data_ring[ao_log_data_pos].sensor.thermistor[i]; - } - ao_log_firetwo(&log); - } + log.type = AO_LOG_SENSOR; + log.u.sensor.pressure = ao_data_ring[ao_log_data_pos].adc.pressure; + log.u.sensor.thrust = ao_data_ring[ao_log_data_pos].adc.thrust; +// for (i = 0; i < 4; i++) { +// log.u.sensor.thermistor[i] = ao_data_ring[ao_log_data_pos].sensor.thermistor[i]; +// } + ao_log_firetwo(&log); ao_log_data_pos = ao_data_ring_next(ao_log_data_pos); } -#if HAS_FLIGHT /* Write state change to EEPROM */ if (ao_flight_state != ao_log_state) { ao_log_state = ao_flight_state; @@ -127,7 +123,6 @@ ao_log(void) if (ao_log_state == ao_flight_landed) ao_log_stop(); } -#endif ao_log_flush(); @@ -139,7 +134,6 @@ ao_log(void) ao_sleep(&ao_log_running); } } -#endif uint16_t ao_log_flight(uint8_t slot) diff --git a/src/telefiretwo-v1.0/Makefile b/src/telefiretwo-v1.0/Makefile index f4629599..87d5d477 100644 --- a/src/telefiretwo-v1.0/Makefile +++ b/src/telefiretwo-v1.0/Makefile @@ -7,6 +7,7 @@ include ../stm/Makefile.defs INC = \ ao.h \ ao_pins.h \ + ao_log.h \ ao_arch.h \ ao_arch_funcs.h \ ao_pad.h \ @@ -52,7 +53,9 @@ ALTOS_SRC = \ ao_aes.c \ ao_aes_tables.c \ ao_pad.c \ - ao_radio_cmac_cmd.c + ao_radio_cmac_cmd.c \ + ao_log.c \ + ao_log_firetwo.c PRODUCT_SRC = \ ao_telefiretwo.c diff --git a/src/telefiretwo-v1.0/ao_pins.h b/src/telefiretwo-v1.0/ao_pins.h index aa8501c0..95189cdc 100644 --- a/src/telefiretwo-v1.0/ao_pins.h +++ b/src/telefiretwo-v1.0/ao_pins.h @@ -41,6 +41,8 @@ #define AO_DATA_RING 32 #define HAS_FIXED_PAD_BOX 1 +#define LOG_ERASE_MARK 0x55 + /* 8MHz High speed external crystal */ #define AO_HSE 8000000 -- cgit v1.2.3 From cd291d38b92b31c3612e6de6cdf4e5988fc01c12 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 23 Apr 2017 00:02:47 -0600 Subject: allow multiple tests to be logged on telefiretwo without rebooting --- src/kernel/ao_log_firetwo.c | 100 ++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ao_log_firetwo.c b/src/kernel/ao_log_firetwo.c index 46559206..4b42abe4 100644 --- a/src/kernel/ao_log_firetwo.c +++ b/src/kernel/ao_log_firetwo.c @@ -81,58 +81,58 @@ ao_log(void) ao_storage_setup(); - ao_log_scan(); - - while (!ao_log_running) - ao_sleep(&ao_log_running); - - log.type = AO_LOG_FLIGHT; - log.tick = ao_time(); - log.u.flight.idle_pressure = ao_idle_pressure; - log.u.flight.idle_thrust = ao_idle_thrust; - log.u.flight.flight = ao_flight_number; - ao_log_firetwo(&log); - - /* Write the whole contents of the ring to the log - * when starting up. - */ - ao_log_data_pos = ao_data_ring_next(ao_data_head); - ao_log_state = ao_flight_startup; - for (;;) { - /* Write samples to EEPROM */ - while (ao_log_data_pos != ao_data_head) { - log.tick = ao_data_ring[ao_log_data_pos].tick; - log.type = AO_LOG_SENSOR; - log.u.sensor.pressure = ao_data_ring[ao_log_data_pos].adc.pressure; - log.u.sensor.thrust = ao_data_ring[ao_log_data_pos].adc.thrust; -// for (i = 0; i < 4; i++) { -// log.u.sensor.thermistor[i] = ao_data_ring[ao_log_data_pos].sensor.thermistor[i]; -// } - ao_log_firetwo(&log); - ao_log_data_pos = ao_data_ring_next(ao_log_data_pos); - } - /* Write state change to EEPROM */ - if (ao_flight_state != ao_log_state) { - ao_log_state = ao_flight_state; - log.type = AO_LOG_STATE; - log.tick = ao_time(); - log.u.state.state = ao_log_state; - log.u.state.reason = 0; - ao_log_firetwo(&log); - - if (ao_log_state == ao_flight_landed) - ao_log_stop(); - } - - ao_log_flush(); - - /* Wait for a while */ - ao_delay(AO_MS_TO_TICKS(100)); - - /* Stop logging when told to */ + do { + ao_log_scan(); + while (!ao_log_running) ao_sleep(&ao_log_running); - } + + log.type = AO_LOG_FLIGHT; + log.tick = ao_time(); + log.u.flight.idle_pressure = ao_idle_pressure; + log.u.flight.idle_thrust = ao_idle_thrust; + log.u.flight.flight = ao_flight_number; + ao_log_firetwo(&log); + + /* Write the whole contents of the ring to the log + * when starting up. + */ + ao_log_data_pos = ao_data_ring_next(ao_data_head); + ao_log_state = ao_flight_startup; + for (;;) { + /* Write samples to EEPROM */ + while (ao_log_data_pos != ao_data_head) { + log.tick = ao_data_ring[ao_log_data_pos].tick; + log.type = AO_LOG_SENSOR; + log.u.sensor.pressure = ao_data_ring[ao_log_data_pos].adc.pressure; + log.u.sensor.thrust = ao_data_ring[ao_log_data_pos].adc.thrust; + // for (i = 0; i < 4; i++) { + // log.u.sensor.thermistor[i] = ao_data_ring[ao_log_data_pos].sensor.thermistor[i]; + // } + ao_log_firetwo(&log); + ao_log_data_pos = ao_data_ring_next(ao_log_data_pos); + } + /* Write state change to EEPROM */ + if (ao_flight_state != ao_log_state) { + ao_log_state = ao_flight_state; + log.type = AO_LOG_STATE; + log.tick = ao_time(); + log.u.state.state = ao_log_state; + log.u.state.reason = 0; + ao_log_firetwo(&log); + + if (ao_log_state == ao_flight_landed) + ao_log_stop(); + } + + ao_log_flush(); + + if (!ao_log_running) break; + + /* Wait for a while */ + ao_delay(AO_MS_TO_TICKS(100)); + } + } while (ao_log_running); } uint16_t -- cgit v1.2.3 From b6b58aa2fbae1e7782b5a0b700544efe319fe34e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 22 Apr 2017 22:04:31 -0700 Subject: altos: Move old AO_LAUNCH defines to cc1111/ao_launch.h These were getting accidentally used by ao_pad.c Signed-off-by: Keith Packard --- src/cc1111/ao_launch.c | 1 + src/cc1111/ao_launch.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/kernel/ao.h | 27 --------------------------- 3 files changed, 45 insertions(+), 27 deletions(-) create mode 100644 src/cc1111/ao_launch.h (limited to 'src/kernel') diff --git a/src/cc1111/ao_launch.c b/src/cc1111/ao_launch.c index 4f0a0c14..76d6d13b 100644 --- a/src/cc1111/ao_launch.c +++ b/src/cc1111/ao_launch.c @@ -17,6 +17,7 @@ */ #include +#include #include __xdata uint16_t ao_launch_ignite; diff --git a/src/cc1111/ao_launch.h b/src/cc1111/ao_launch.h new file mode 100644 index 00000000..966b5cea --- /dev/null +++ b/src/cc1111/ao_launch.h @@ -0,0 +1,44 @@ +/* + * Copyright © 2017 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#ifndef _AO_LAUNCH_H_ +#define _AO_LAUNCH_H_ +/* ao_launch.c */ + +struct ao_launch_command { + uint16_t tick; + uint16_t serial; + uint8_t cmd; + uint8_t channel; + uint16_t unused; +}; + +#define AO_LAUNCH_QUERY 1 + +struct ao_launch_query { + uint16_t tick; + uint16_t serial; + uint8_t channel; + uint8_t valid; + uint8_t arm_status; + uint8_t igniter_status; +}; + +#define AO_LAUNCH_ARM 2 +#define AO_LAUNCH_FIRE 3 + +void +ao_launch_init(void); + +#endif /* _AO_LAUNCH_H_ */ diff --git a/src/kernel/ao.h b/src/kernel/ao.h index 9ab7991b..e56fbb2e 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -856,33 +856,6 @@ struct ao_fifo { #include #endif -/* ao_launch.c */ - -struct ao_launch_command { - uint16_t tick; - uint16_t serial; - uint8_t cmd; - uint8_t channel; - uint16_t unused; -}; - -#define AO_LAUNCH_QUERY 1 - -struct ao_launch_query { - uint16_t tick; - uint16_t serial; - uint8_t channel; - uint8_t valid; - uint8_t arm_status; - uint8_t igniter_status; -}; - -#define AO_LAUNCH_ARM 2 -#define AO_LAUNCH_FIRE 3 - -void -ao_launch_init(void); - /* * ao_log_single.c */ -- cgit v1.2.3