Display error number on error
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 15 Sep 2016 03:15:13 +0000 (05:15 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 11 Feb 2023 04:06:55 +0000 (05:06 +0100)
i2c_uv/main.c

index add6bee..3ac79f2 100644 (file)
@@ -94,7 +94,7 @@ void uv_display(int uart_num)
 
        ret = veml6070_sensor_read(&veml6070_sensor, &uv_raw);
        if (ret != 0) {
-               uprintf(uart_num, "UV read error\n");
+               uprintf(uart_num, "UV read error: %d\n", ret);
        } else {
                uprintf(uart_num, "UV: 0x%04x\n", uv_raw);
        }