From fa527f4f1c8ed55daaf5f7929d34b2509d2c5dcf Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 15 Sep 2016 05:15:13 +0200 Subject: [PATCH] Display error number on error --- i2c_uv/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.43.0