summaryrefslogtreecommitdiff
path: root/include/console.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/console.h')
-rw-r--r--include/console.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index 91800103b6..5bb1f2541f 100644
--- a/include/console.h
+++ b/include/console.h
@@ -10,6 +10,7 @@
#include "common.h"
#include "config.h"
+#include <stdbool.h>
#ifdef CONFIG_ZEPHYR
#include "zephyr_console_shim.h"
@@ -137,6 +138,22 @@ void console_channel_enable(const char *name);
void console_channel_disable(const char *name);
/**
+ * Check if channel is disabled.
+ *
+ * @param channel Output channel
+ *
+ * @return true if channel is disabled, false if not.
+ */
+#ifdef CONFIG_CONSOLE_CHANNEL
+bool console_channel_is_disabled(enum console_channel channel);
+#else
+static inline bool console_channel_is_disabled(enum console_channel channel)
+{
+ return false;
+}
+#endif
+
+/**
* Put a string to the console channel.
*
* @param channel Output chanel