subsys: console: Fix the buffer size checking
Fix the problem that no compiler error even the buffer size is not power of 2. Signed-off-by: Aska Wu <aska.wu@linaro.org>
This commit is contained in:
parent
7514178df4
commit
fa934009cb
|
@ -11,11 +11,11 @@
|
|||
#include <drivers/console/console.h>
|
||||
#include <drivers/console/uart_console.h>
|
||||
|
||||
#if CONFIG_CONSOLE_GETCHAR_BUFSIZE & (CONFIG_CONSOLE_GETCHAR_BUFSIZE - 1) != 0
|
||||
#if (CONFIG_CONSOLE_GETCHAR_BUFSIZE & (CONFIG_CONSOLE_GETCHAR_BUFSIZE - 1)) != 0
|
||||
#error CONFIG_CONSOLE_GETCHAR_BUFSIZE must be power of 2
|
||||
#endif
|
||||
|
||||
#if CONFIG_CONSOLE_PUTCHAR_BUFSIZE & (CONFIG_CONSOLE_PUTCHAR_BUFSIZE - 1) != 0
|
||||
#if (CONFIG_CONSOLE_PUTCHAR_BUFSIZE & (CONFIG_CONSOLE_PUTCHAR_BUFSIZE - 1)) != 0
|
||||
#error CONFIG_CONSOLE_PUTCHAR_BUFSIZE must be power of 2
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue