summaryrefslogtreecommitdiff
path: root/src/ao_log.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2010-08-27 03:08:53 -0600
committerBdale Garbee <bdale@gag.com>2010-08-27 03:08:53 -0600
commitc443f43f8dee6e0fcbcecf9d09e948fd928b7af4 (patch)
tree653fe6ba91e165aaf8a6b4eef17602c5f1bd62a9 /src/ao_log.c
parent295043112ccde35092945c286596f9045ee6fa05 (diff)
parent2923cf5057f9cef110dd547d8677ea5b60e00796 (diff)
Merge branch 'new-packet-format' of ssh://git.gag.com/scm/git/fw/altos into new-package-format
Diffstat (limited to 'src/ao_log.c')
-rw-r--r--src/ao_log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ao_log.c b/src/ao_log.c
index d550d408..18bdb8c8 100644
--- a/src/ao_log.c
+++ b/src/ao_log.c
@@ -33,14 +33,16 @@ ao_log_csum(__xdata uint8_t *b) __reentrant
return -sum;
}
-void
+uint8_t
ao_log_data(__xdata struct ao_log_record *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_running) {
+ wrote = 1;
ao_ee_write(ao_log_current_pos,
(uint8_t *) log,
sizeof (struct ao_log_record));
@@ -51,6 +53,7 @@ ao_log_data(__xdata struct ao_log_record *log) __reentrant
ao_log_running = 0;
}
} ao_mutex_put(&ao_log_mutex);
+ return wrote;
}
void