#include <sys/time.h>
#include <libusb-1.0/libusb.h>
+#include "version.h"
#include "hexdump.h"
#include "hmcfgusb.h"
}
printf("HM-CFG-USB opened!\n");
- hmcfgusb_send_null_frame(dev);
+ hmcfgusb_send_null_frame(dev, 1);
hmcfgusb_send(dev, (unsigned char*)"K", 1, 1);
while(!quit) {
continue;
} else if (fd == -1) {
if (errno) {
- perror("hmcfgusb_poll");
- break;
- } else {
- /* periodically wakeup the device */
- hmcfgusb_send_null_frame(dev);
+ if (errno != ETIMEDOUT) {
+ perror("hmcfgusb_poll");
+ break;
+ } else {
+ /* periodically wakeup the device */
+ hmcfgusb_send_null_frame(dev, 1);
+ }
}
}
}