summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-10 09:37:43 -0700
committerKeith Packard <keithp@keithp.com>2014-06-10 09:38:53 -0700
commit75df97b5f6ade3310618a477b685d39b7fd4666e (patch)
treec4e77a81e5a3735d3bfe800d4cbfb1b64951ce7c /src
parent998eae61ecf56dd6ead4ec6ad82c952ae84170df (diff)
altos: Report total available log space in version command
This provides a more accurate means of determining available log space than guessing whether some portion of the flash chip holds configuration data. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/cc1111/ao_pins.h3
-rw-r--r--src/kernel/ao_cmd.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/cc1111/ao_pins.h b/src/cc1111/ao_pins.h
index 298d6acc..2b19f1f6 100644
--- a/src/cc1111/ao_pins.h
+++ b/src/cc1111/ao_pins.h
@@ -18,7 +18,8 @@
#ifndef _AO_PINS_H_
#define _AO_PINS_H_
-#define HAS_RADIO 1
+#define HAS_RADIO 1
+#define DISABLE_LOG_SPACE 1
#if defined(TELEMETRUM_V_1_0)
/* Discontinued and was never built with CC1111 chips needing this */
diff --git a/src/kernel/ao_cmd.c b/src/kernel/ao_cmd.c
index 69372fed..5d8683e1 100644
--- a/src/kernel/ao_cmd.c
+++ b/src/kernel/ao_cmd.c
@@ -283,6 +283,9 @@ version(void)
#endif
#if HAS_LOG
"log-format %u\n"
+#if !DISABLE_LOG_SPACE
+ "log-space %lu\n"
+#endif
#endif
#if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND)
"program-space %u\n"
@@ -295,6 +298,9 @@ version(void)
#endif
#if HAS_LOG
, ao_log_format
+#if !DISABLE_LOG_SPACE
+ , (unsigned long) ao_storage_log_max
+#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