}
}
errno = 0;
- pfd = hmcfgusb_poll(dev->hmcfgusb, 1);
+ pfd = hmcfgusb_poll(dev->hmcfgusb, 1000);
if ((pfd < 0) && errno) {
if (errno != ETIMEDOUT) {
perror("\n\nhmcfgusb_poll");
int pfd;
do {
errno = 0;
- pfd = culfw_poll(dev->culfw, 1);
+ pfd = culfw_poll(dev->culfw, 200);
if ((pfd < 0) && errno) {
if (errno != ETIMEDOUT) {
perror("\n\nculfw_poll");
while (1) {
errno = 0;
- pfd = hmcfgusb_poll(dev->hmcfgusb, 1);
+ pfd = hmcfgusb_poll(dev->hmcfgusb, 1000);
if ((pfd < 0) && errno) {
if (errno != ETIMEDOUT) {
perror("\n\nhmcfgusb_poll");
culfw_send(dev.culfw, "V\r\n", 3);
errno = 0;
- pfd = culfw_poll(dev.culfw, 1);
+ pfd = culfw_poll(dev.culfw, 1000);
if ((pfd < 0) && errno) {
if (errno != ETIMEDOUT) {
perror("\n\nhmcfgusb_poll");
(rdata.version >> 8) & 0xff,
rdata.version & 0xff);
- if (rdata.version < 0x0139) {
- fprintf(stderr, "\nThis version does _not_ support firmware upgrade mode!\n");
+ if (rdata.version < 0x013a) {
+ fprintf(stderr, "\nThis version does _not_ support firmware upgrade mode, you need at least 1.58!\n");
exit(EXIT_FAILURE);
- } else if (rdata.version < 0x0140) {
- printf("\n*** This version probably not supports firmware upgrade mode! ***\n\n");
}
} else {
hmcfgusb_set_debug(debug);
while (1) {
errno = 0;
- pfd = hmcfgusb_poll(dev.hmcfgusb, 1);
+ pfd = hmcfgusb_poll(dev.hmcfgusb, 1000);
if ((pfd < 0) && errno) {
if (errno != ETIMEDOUT) {
perror("\n\nhmcfgusb_poll");
errno = 0;
switch (dev.type) {
case DEVICE_TYPE_CULFW:
- pfd = culfw_poll(dev.culfw, 1);
+ pfd = culfw_poll(dev.culfw, 1000);
break;
case DEVICE_TYPE_HMCFGUSB:
default:
- pfd = hmcfgusb_poll(dev.hmcfgusb, 1);
+ pfd = hmcfgusb_poll(dev.hmcfgusb, 1000);
break;
}
errno = 0;
switch(dev.type) {
case DEVICE_TYPE_CULFW:
- pfd = culfw_poll(dev.culfw, 1);
+ pfd = culfw_poll(dev.culfw, 1000);
break;
case DEVICE_TYPE_HMCFGUSB:
default:
- pfd = hmcfgusb_poll(dev.hmcfgusb, 1);
+ pfd = hmcfgusb_poll(dev.hmcfgusb, 1000);
break;
}
if ((pfd < 0) && errno) {