#define TEMP_RESOLUTION 0.0625
-static const char trb_i2c_version[] = "$Revision: 1.2 $";
+static const char trb_i2c_version[] = "$Revision: 1.3 $";
static const uint16_t adcm_uid_register = 0xc000;
for (i = 0, ctr = 0; (i < len) && (tmp < end); i += 4, tmp += 4, ctr++) {
if ((tmp[2] & 0x8000) > 0 ) {
printf("%02d 0x%08x%08x\n", ctr, tmp[1], tmp[0]);
- }
+ } else {
+ printf("%02d ------------------\n", ctr);
+ }
}
}
for (i = 0, ctr = 0; (i < len) && (tmp < end); i += 4, tmp += 4, ctr++) {
if ((tmp[2] & 0x8000) > 0 ) {
int16_t temperature = tmp[2] & 0x7fff;
- temperature = 0x8e37 & 0x7fff;
temperature = (temperature & 0x0800) == 0
? temperature
: temperature | 0xf000;
printf("%02d %.04f\n", ctr, temperature * TEMP_RESOLUTION);
- }
+ } else {
+ printf("%02d -------\n", ctr);
+ }
}
}