From: Nathael Pajani Date: Thu, 15 Sep 2016 03:15:00 +0000 (+0200) Subject: Display error number on error X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=55f60f30c106499e332437ae7d15591e14829449;p=soft%2Flpc82x%2Fexamples Display error number on error --- diff --git a/i2c_light/main.c b/i2c_light/main.c index be3beea..993fbc7 100644 --- a/i2c_light/main.c +++ b/i2c_light/main.c @@ -91,7 +91,7 @@ void lux_display(int uart_num) ret = tsl256x_sensor_read(&tsl256x_sensor, &comb, &ir, &lux); if (ret != 0) { - uprintf(uart_num, "Lux read error\n"); + uprintf(uart_num, "Lux read error: %d\n", ret); } else { uprintf(uart_num, "Lux: %d (Comb: 0x%04x, IR: 0x%04x)\n", lux, comb, ir); }