[PATCH 3/5] console: introduce new callback set_mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



so we can set the port in rs485 mode

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
---
 include/console.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/console.h b/include/console.h
index 355e259..ef6e193 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;
 
-- 
1.8.4.rc1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux