diff --git a/lib/io/console.c b/lib/io/console.c index 07afc43bf..ec32e3f77 100644 --- a/lib/io/console.c +++ b/lib/io/console.c @@ -44,7 +44,6 @@ static uint8_t console_cbuf_buf[CONSOLE_BUF_LEN]; /* print lock must be held when invoking out, outs, outc */ static void out_count(const char *str, size_t len) { print_callback_t *cb; - size_t i; /* print to any registered loggers */ if (!list_is_empty(&print_callbacks)) { @@ -60,6 +59,7 @@ static void out_count(const char *str, size_t len) { } #if CONSOLE_OUTPUT_TO_PLATFORM_PUTC + size_t i; /* write out the serial port */ for (i = 0; i < len; i++) { platform_dputc(str[i]); diff --git a/lib/io/rules.mk b/lib/io/rules.mk index 30b4cc568..1e882f361 100644 --- a/lib/io/rules.mk +++ b/lib/io/rules.mk @@ -2,9 +2,14 @@ LOCAL_DIR := $(GET_LOCAL_DIR) MODULE := $(LOCAL_DIR) +CONSOLE_OUTPUT_TO_PLATFORM_PUTC ?= 1 + MODULE_DEPS := \ lib/cbuf +MODULE_DEFINES += \ + CONSOLE_OUTPUT_TO_PLATFORM_PUTC=$(CONSOLE_OUTPUT_TO_PLATFORM_PUTC) + MODULE_SRCS += \ $(LOCAL_DIR)/console.c \ $(LOCAL_DIR)/io.c \