From 3d584266e5df5fb8dfc59b660434ad2e2108d044 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Tue, 21 Oct 2014 16:01:08 +0800 Subject: [PATCH] finsh: allow user to disable the FINSH_USING_HISTORY --- components/finsh/shell.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/finsh/shell.h b/components/finsh/shell.h index 448f9e6fbe..92fa4bccb2 100644 --- a/components/finsh/shell.h +++ b/components/finsh/shell.h @@ -33,7 +33,17 @@ #include #include "finsh.h" -#define FINSH_USING_HISTORY +/* For historical reasons, users don't define FINSH_USING_HISTORY in rtconfig.h + * but expect the history feature. So you sould define FINSH_USING_HISTORY to 0 + * to disable it from the rtconfig.h. */ +#ifdef FINSH_USING_HISTORY +# if FINSH_USING_HISTORY == 0 +# undef FINSH_USING_HISTORY +# endif +#else +# define FINSH_USING_HISTORY +#endif + #ifndef FINSH_THREAD_PRIORITY #define FINSH_THREAD_PRIORITY 20 #endif