summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-29 11:41:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-31 08:49:42 +0200
commitca8a4b0ff52a7505d3970c2619a309a52f7479fc (patch)
treeaef68446454edad57f9ee72ff0d03f53569208e8 /include
parent37b8e171350d8803f3a637813c28fdd89a18d28a (diff)
downloadbarebox-ca8a4b0ff52a7505d3970c2619a309a52f7479fc.tar.gz
barebox-ca8a4b0ff52a7505d3970c2619a309a52f7479fc.tar.xz
PBL: console: Make independent of DEBUG_LL
With more stuff being done in PBL regular console support gets more and more useful. This makes the PBL console independent of DEBUG_LL which is only meant for early debugging but not regular output. To use the regular PBL console a board must call pbl_set_putc() which stores a pointer to the putc function to be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/console.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h
index 839ec17e50..a6737c8581 100644
--- a/include/console.h
+++ b/include/console.h
@@ -83,4 +83,10 @@ unsigned console_get_active(struct console_device *cdev);
int console_set_baudrate(struct console_device *cdev, unsigned baudrate);
unsigned console_get_baudrate(struct console_device *cdev);
+#ifdef CONFIG_PBL_CONSOLE
+void pbl_set_putc(void (*putcf)(void *ctx, int c), void *ctx);
+#else
+static inline void pbl_set_putc(void (*putcf)(void *ctx, int c), void *ctx) {}
+#endif
+
#endif