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>
Thu, 15 Sep 2016 03:15:13 +0000 (05:15 +0200)
apps/base/i2c_uv/main.c

index 0c0170d..01a5554 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);
        }