summaryrefslogtreecommitdiffstats
path: root/include/console.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-08 11:05:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-09 08:12:33 +0200
commit4cfc09da3865df1f0f8ea48d34073a8135011d04 (patch)
treeb17d2cf3df5da0002d148f37a07591cfc7474613 /include/console.h
parentd47e89a45d8ee57c31e6afcdfcbc1288dcaa27a6 (diff)
downloadbarebox-4cfc09da3865df1f0f8ea48d34073a8135011d04.tar.gz
barebox-4cfc09da3865df1f0f8ea48d34073a8135011d04.tar.xz
console: Add functions to get/set active state of console
Currently code needs to fiddle with the active parameter of a console device directly to enable/disable consoles. Add console_set_active() to set the status and console_get_active() to get the current status. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/console.h')
-rw-r--r--include/console.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index 72b4a440e7..f7055e6394 100644
--- a/include/console.h
+++ b/include/console.h
@@ -52,6 +52,7 @@ struct console_device {
struct list_head list;
unsigned char f_active;
+ char active[4];
unsigned int baudrate;
@@ -75,4 +76,7 @@ extern int barebox_loglevel;
struct console_device *console_get_first_active(void);
+int console_set_active(struct console_device *cdev, unsigned active);
+unsigned console_get_active(struct console_device *cdev);
+
#endif