static const uint16_t BroadCastRich = 0xfffb;
-static const char trbrichcmd_version[] = "$Revision: 1.11 $";
+static const char trbrichcmd_version[] = "$Revision: 1.12 $";
static const uint16_t adcm_uid_register = 0xc000;
uint16_t trb_address = BroadCastRich;
int status = 0;
unsigned int timeOut = 0;
+ int success = 0;
if (argc - optind == 2) {
trb_address = (uint16_t)strtoul(argv[optind + 1], NULL, 0);
tmp = buffer;
end = buffer + status;
+ success = 1;
while (tmp < end) {
unsigned int len = *tmp >> 16;
uint16_t endPoint = *tmp & 0xffff;
"TimeOut: %d Sync Failed on EndPoint: "
"0x%04x APV#: %02d\n",
timeOut, endPoint, ((*tmp >> 16) &0xf));
+ success = 0;
}
}
}
timeOut++;
+ if (success == 1) break;
+ }
+ if (success == 0) {
+ fprintf(stderr, "sync_apv failed\n");
}
free(buffer);