summaryrefslogtreecommitdiff
path: root/driver/temp_sensor/tmp411.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/temp_sensor/tmp411.c')
-rw-r--r--driver/temp_sensor/tmp411.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver/temp_sensor/tmp411.c b/driver/temp_sensor/tmp411.c
index e65c9eae8c..ef22052da8 100644
--- a/driver/temp_sensor/tmp411.c
+++ b/driver/temp_sensor/tmp411.c
@@ -232,10 +232,10 @@ static int print_status(void)
ccprintf("\n");
if (raw_read8(TMP411_STATUS_R, &value) == EC_SUCCESS)
- ccprintf("STATUS: %08b\n", value);
+ ccprintf("STATUS: %pb\n", BINARY_VALUE(value, 8));
if (raw_read8(TMP411_CONFIGURATION1_R, &value) == EC_SUCCESS)
- ccprintf("CONFIG1: %08b\n", value);
+ ccprintf("CONFIG1: %pb\n", BINARY_VALUE(value, 8));
return EC_SUCCESS;
}
@@ -285,7 +285,8 @@ static int command_tmp411(int argc, char **argv)
rv = raw_read8(offset, &data);
if (rv < 0)
return rv;
- ccprintf("Byte at offset 0x%02x is %08b\n", offset, data);
+ ccprintf("Byte at offset 0x%02x is %pb\n",
+ offset, BINARY_VALUE(data, 8));
return rv;
}