uint32_t respLen; /* 0 means variable, > 0 fixed */
} TrinketProtoDesc;
-static const TrinketProtoDesc protoDesc[] = {
+/* hardcoded knowledge from docs/geyger.pdf */
+static const TrinketProtoDesc protoDesc[] = {
{CMD_PING, 4, 5 },
{CMD_VCC_VALUE, 4, 8 },
{CMD_VCC_ALARM, 8, 8 },
}
if (r != sizeof(resp)) {
- fprintf(stderr, "hid_read_timeout returns %d instead of %u\n", r, sizeof(resp));
+ fprintf(stderr, "hid_read_timeout returns %d instead of %u\n", r, (unsigned int)sizeof(resp));
return ERR_ERROR;
}
}
if (r != sizeof(resp)) {
- fprintf(stderr, "hid_read_timeout returns %d instead of %u\n", r, sizeof(resp));
+ fprintf(stderr, "hid_read_timeout returns %d instead of %u\n", r, (unsigned int)sizeof(resp));
return ERR_ERROR;
}