diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-01-27 23:41:24 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-01-27 23:41:24 +0000 |
commit | 41b12108d724f71dd219a2691a418574cd4d59d9 (patch) | |
tree | b50bbf9343d77258dd7dd7fe26dfbe082f6bf391 | |
parent | uid check in eeprom working (diff) |
set tty to raw
git-svn-id: https://svn.spreadspace.org/avr/trunk@81 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r-- | usb-i2c-sl018/update-keys.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 <stdint.h> #include <ctype.h> #include <stdio.h> +#include <termios.h> #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; |