Private
Public Access
2
0

uart_ow: Better error handling in corner cases

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-04-15 12:03:32 +01:00
parent 4a52ad6c4f
commit c41c3b41d5
4 changed files with 72 additions and 44 deletions

View File

@@ -58,8 +58,7 @@ main(int argc, char** argv)
uint8_t count = 0;
// start the search from scratch
uint8_t result = mraa_uart_ow_rom_search(uart, 1, id);
mraa_result_t result = mraa_uart_ow_rom_search(uart, 1, id);
if (result == MRAA_ERROR_UART_OW_NO_DEVICES) {
printf("No devices detected.\n");
return 1;