#include <sys/time.h>
#include <libusb-1.0/libusb.h>
+#include "version.h"
#include "hexdump.h"
#include "hmcfgusb.h"
if (buf[2] & (1 << 7)) printf("RPTEN ");
printf("\n");
printf("\tMessage type: %s (0x%02x)\n", hm_message_types(buf[3]), buf[3]);
- printf("\tMesage: ");
+ printf("\tMessage: ");
for (i = 10; i < len; i++) {
printf("%02X", buf[i]);
}
rdata.wrong_hmid = 0;
hmcfgusb_send(dev, (unsigned char*)"K", 1, 1);
}
- fd = hmcfgusb_poll(dev, 1);
+ fd = hmcfgusb_poll(dev, 1000);
if (fd >= 0) {
fprintf(stderr, "activity on unknown fd %d!\n", fd);
continue;
hmcfgusb_close(dev);
} while (!quit);
+ hmcfgusb_exit();
+
return EXIT_SUCCESS;
}