summaryrefslogtreecommitdiff
path: root/src/kernel/ao_log.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-08-17 20:59:45 -0700
committerKeith Packard <keithp@keithp.com>2014-08-17 20:59:45 -0700
commitbb7522acf040f41740ecd059e3d5d2480b652420 (patch)
tree9c174cdac4493d3e2ab0fdec0ca065df0d25f2ed /src/kernel/ao_log.h
parent1530c24cc75cdf9ba87c7e153ff28bf7beb4384c (diff)
telegps-v1.0: Provide one log and append to it
Instead of creating per-flight logs, create a single log and append data to it each time TeleGPS is powered on. This avoids potentially running out of log space just because the device is powered off/on. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_log.h')
-rw-r--r--src/kernel/ao_log.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/ao_log.h b/src/kernel/ao_log.h
index da20e067..c5fa7fab 100644
--- a/src/kernel/ao_log.h
+++ b/src/kernel/ao_log.h
@@ -51,11 +51,16 @@ extern __pdata enum ao_flight_state ao_log_state;
#define AO_LOG_FORMAT_NONE 127 /* No log at all */
extern __code uint8_t ao_log_format;
+extern __code uint8_t ao_log_size;
/* Return the flight number from the given log slot, 0 if none */
uint16_t
ao_log_flight(uint8_t slot);
+/* Check if there is valid log data at the specified location */
+uint8_t
+ao_log_check(uint32_t pos);
+
/* Flush the log */
void
ao_log_flush(void);