From 41b12108d724f71dd219a2691a418574cd4d59d9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 27 Jan 2013 23:41:24 +0000 Subject: set tty to raw git-svn-id: https://svn.spreadspace.org/avr/trunk@81 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- usb-i2c-sl018/update-keys.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'usb-i2c-sl018') diff --git a/usb-i2c-sl018/update-keys.c b/usb-i2c-sl018/update-keys.c index 116a285..6ea508a 100644 --- a/usb-i2c-sl018/update-keys.c +++ b/usb-i2c-sl018/update-keys.c @@ -23,6 +23,7 @@ #include #include #include +#include #define EEPROM_SIZE 1024 typedef uint8_t keyslot_t[8]; @@ -50,6 +51,13 @@ int main(int argc, char* argv[]) return -2; } + int fd = fileno(dev); + struct termios t; + tcgetattr(fd, &t); + cfmakeraw(&t); + tcflush(fd, TCIOFLUSH); + tcsetattr(fd, TCSANOW, &t); + fprintf(dev, "e"); char* line = NULL; -- cgit v1.2.3