From: Nathael Pajani Date: Thu, 15 Sep 2016 03:15:13 +0000 (+0200) Subject: Display error number on error X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=fa527f4f1c8ed55daaf5f7929d34b2509d2c5dcf;p=soft%2Flpc82x%2Fexamples Display error number on error --- diff --git a/i2c_uv/main.c b/i2c_uv/main.c index add6bee..3ac79f2 100644 --- a/i2c_uv/main.c +++ b/i2c_uv/main.c @@ -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); }