[PATCH 09/10] pbl: Implement ctrlc() using getc_ll()

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

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 pbl/console.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/pbl/console.c b/pbl/console.c
index a9859ad..e34633f 100644
--- a/pbl/console.c
+++ b/pbl/console.c
@@ -30,12 +30,19 @@ int pr_print(int level, const char *fmt, ...)

 	return i;
 }
-
+#ifdef CONFIG_DEBUG_LL_INPUT
 int ctrlc(void)
 {
+	if (tstc_ll() && getc_ll() == 3)
+		return 1;
 	return 0;
 }
-
+#else
+int ctrlc(void)
+{
+	return 0;
+}
+#endif
 void console_putc(unsigned int ch, char c)
 {
 	putc_ll(c);
--
2.1.4

_______________________________________________
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