You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2019/01/09 10:07:07 UTC

[mynewt-core] 06/08: [donotmerge] hw/mcu/nordic: hal_i2c debug printouts

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch bus-dev-test
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 87661531442ce4b548a28b09f20b3956fa4e27d2
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Nov 26 13:58:28 2018 +0100

    [donotmerge] hw/mcu/nordic: hal_i2c debug printouts
---
 hw/mcu/nordic/nrf52xxx/src/hal_i2c.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
index dde19ff..88d9518 100644
--- a/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
+++ b/hw/mcu/nordic/nrf52xxx/src/hal_i2c.c
@@ -26,6 +26,7 @@
 #include <hal/hal_gpio.h>
 #include <mcu/nrf52_hal.h>
 #include "nrf_twim.h"
+#include "console/console.h"
 
 #include <nrf.h>
 
@@ -542,6 +543,8 @@ err:
         rc = hal_i2c_convert_status(nrf_status);
     }
 
+    console_printf("\x1B[1;31m%s: addr %02x last_op %d rc %d\x1B[0m\n", __func__, pdata->address, last_op, rc);
+
     return (rc);
 }
 
@@ -618,6 +621,8 @@ err:
         rc = hal_i2c_convert_status(nrf_status);
     }
 
+    console_printf("\x1B[1;31m%s: addr %02x last_op %d rc %d\x1B[0m\n", __func__, pdata->address, last_op, rc);
+
     return (rc);
 }