diff --git a/Makefile b/Makefile index 3cbfb56..ff1c528 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +CFLAGS= + SOURCES := \ updater.c \ usb_read.c \ @@ -19,10 +21,10 @@ firmware/%.bin.c: firmware/%.bin xxd -i $^ $@ updater: $(SOURCES) - gcc -o $@ $^ -lusb-1.0 + gcc $(CFLAGS) -o $@ $^ -lusb-1.0 usbreset: extra/usbreset.c - gcc -o $@ $^ + gcc $(CFLAGS) -o $@ $^ clean: rm -f updater usbreset firmware/*.c diff --git a/usb_keyboard.c b/usb_keyboard.c index 0470d51..0464eee 100644 --- a/usb_keyboard.c +++ b/usb_keyboard.c @@ -225,7 +225,7 @@ int write_kb_fw(const unsigned char *data, int data_length) if (rc >= 0) { break; } - usleep(100*1000); + usleep(500*1000); } if (try == 20) { diff --git a/usb_touchpad.c b/usb_touchpad.c index b115cb2..5467f8a 100644 --- a/usb_touchpad.c +++ b/usb_touchpad.c @@ -111,7 +111,7 @@ int write_tp_fw(const unsigned char *fw, int fw_length) fw_length = 24 * 1024; printf("[*] Opening in touchpad mode\n"); - for (try = 0; try < 3; try++) { + for (try = 0; try < 20; try++) { rc = open_touchpad_mode(); if (rc >= 0) { break;