summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;