summaryrefslogtreecommitdiff
path: root/usb-i2c-sl018
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2013-01-27 23:41:24 +0000
committerChristian Pointner <equinox@spreadspace.org>2013-01-27 23:41:24 +0000
commit41b12108d724f71dd219a2691a418574cd4d59d9 (patch)
treeb50bbf9343d77258dd7dd7fe26dfbe082f6bf391 /usb-i2c-sl018
parentuid check in eeprom working (diff)
set tty to raw
git-svn-id: https://svn.spreadspace.org/avr/trunk@81 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'usb-i2c-sl018')
-rw-r--r--usb-i2c-sl018/update-keys.c8
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;