logging: Use single byte log_output buffer in an immediate mode

Ensure that RTT and xtensa_sim backends are using single byte
log_output buffer.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-11-20 14:31:40 +01:00 committed by Andrew Boie
commit 0e14a95f83
2 changed files with 6 additions and 3 deletions

View file

@ -41,8 +41,10 @@
#define MESSAGE_SIZE CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE
#define CHAR_BUF_SIZE IS_ENABLED(CONFIG_LOG_BACKEND_RTT_MODE_BLOCK) ? \
CONFIG_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE : 1
#define CHAR_BUF_SIZE \
((IS_ENABLED(CONFIG_LOG_BACKEND_RTT_MODE_BLOCK) && \
!IS_ENABLED(CONFIG_LOG_IMMEDIATE)) ? \
CONFIG_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE : 1)
#define RTT_LOCK() \
COND_CODE_0(CONFIG_LOG_BACKEND_RTT_BUFFER, (SEGGER_RTT_LOCK()), ())