diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-09-19 15:20:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-24 09:21:40 +0200 |
commit | 9adf567789b919d206f38fd2229704b67b7cb89c (patch) | |
tree | 6b140a8f6ae0bb33d3c65ea344bea7b05487518f /include/console.h | |
parent | 050f0d5978efde602c890d565dcba1566be6a335 (diff) | |
download | barebox-9adf567789b919d206f38fd2229704b67b7cb89c.tar.gz barebox-9adf567789b919d206f38fd2229704b67b7cb89c.tar.xz |
console: introduce new callback set_mode
so we can set the port in rs485 mode
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 355e259883..ef6e193a20 100644 --- a/include/console.h +++ b/include/console.h @@ -28,6 +28,11 @@ #define CONSOLE_STDOUT (1 << 1) #define CONSOLE_STDERR (1 << 2) +enum console_mode { + CONSOLE_MODE_NORMAL, + CONSOLE_MODE_RS485, +}; + struct console_device { struct device_d *dev; struct device_d class_dev; @@ -37,6 +42,7 @@ struct console_device { int (*getc)(struct console_device *cdev); int (*setbrg)(struct console_device *cdev, int baudrate); void (*flush)(struct console_device *cdev); + int (*set_mode)(struct console_device *cdev, enum console_mode mode); struct list_head list; |