From 19f6da99ed651781ad6995aa0a8db03acbafa0c5 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 3 Apr 2020 00:16:54 +0200 Subject: [PATCH] examples/console: match prompt to the target name --- examples/system/console/main/console_example_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/system/console/main/console_example_main.c b/examples/system/console/main/console_example_main.c index c91d79509f..db062a263a 100644 --- a/examples/system/console/main/console_example_main.c +++ b/examples/system/console/main/console_example_main.c @@ -22,6 +22,7 @@ #include "nvs_flash.h" static const char* TAG = "example"; +#define PROMPT_STR CONFIG_IDF_TARGET /* Console command history can be stored to and loaded from a file. * The easiest way to do this is to use FATFS filesystem on top of @@ -143,7 +144,7 @@ void app_main(void) /* Prompt to be printed before each line. * This can be customized, made dynamic, etc. */ - const char* prompt = LOG_COLOR_I "esp32> " LOG_RESET_COLOR; + const char* prompt = LOG_COLOR_I PROMPT_STR "> " LOG_RESET_COLOR; printf("\n" "This is an example of ESP-IDF console component.\n" @@ -163,7 +164,7 @@ void app_main(void) /* Since the terminal doesn't support escape sequences, * don't use color codes in the prompt. */ - prompt = "esp32> "; + prompt = PROMPT_STR "> "; #endif //CONFIG_LOG_COLORS }