From 75df97b5f6ade3310618a477b685d39b7fd4666e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 10 Jun 2014 09:37:43 -0700 Subject: [PATCH] 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 --- src/cc1111/ao_pins.h | 3 ++- src/kernel/ao_cmd.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.30.2