From b24ee5507a1b882be84096e3cb1494eda97136af Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 8 Aug 2016 22:20:18 +0200 Subject: [PATCH] Fix comments and use uprintf instead of serial_write --- i2c_temp/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i2c_temp/main.c b/i2c_temp/main.c index 7a6b9d4..3db7519 100644 --- a/i2c_temp/main.c +++ b/i2c_temp/main.c @@ -77,7 +77,7 @@ void temp_config(int uart_num) /* Temp sensor */ ret = tmp101_sensor_config(&tmp101_sensor); if (ret != 0) { - serial_write(uart_num, "Temp config error\r\n", 19); + uprintf(uart_num, "Temp config error\n"); } } @@ -91,9 +91,9 @@ void temp_display(int uart_num) msleep(250); /* Wait for the end of the conversion : 40ms */ len = tmp101_sensor_read(&tmp101_sensor, &raw, &deci_degrees); if (len != 0) { - serial_write(uart_num, "Temp read error\r\n", 19); + uprintf(uart_num, "Temp read error\n"); } else { - uprintf(uart_num, "Temp read: %d,%d - raw: 0x%04x.\r\n", + uprintf(uart_num, "Temp read: %d,%d - raw: 0x%04x.\n", (deci_degrees/10), (deci_degrees%10), raw); } } -- 2.43.0