You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/05/15 21:35:40 UTC

[GitHub] [mynewt-core] kasjer commented on a change in pull request #1817: Dev bst

kasjer commented on a change in pull request #1817: Dev bst
URL: https://github.com/apache/mynewt-core/pull/1817#discussion_r284036806
 
 

 ##########
 File path: hw/drivers/sensors/bma253/src/bma253.c
 ##########
 @@ -30,30 +30,56 @@
 #else
 #include "hal/hal_i2c.h"
 #include "i2cn/i2cn.h"
+#include "hal/hal_spi.h"
 #endif
 
+
 #if MYNEWT_VAL(BMA253_LOG)
 #include "modlog/modlog.h"
 #endif
 
+
+#define BMA253_LOG_LEVEL_THRESH LOG_LEVEL_WARN
+
 #if MYNEWT_VAL(BMA253_LOG)
 
 #define BMA253_LOG(lvl_, ...) \
-    MODLOG_ ## lvl_(MYNEWT_VAL(BMA253_LOG_MODULE), __VA_ARGS__)
+    if ((LOG_LEVEL_ ## lvl_) >= BMA253_LOG_LEVEL_THRESH) { MODLOG_ ## lvl_(MYNEWT_VAL(BMA253_LOG_MODULE), __VA_ARGS__); }
 #else
 #define BMA253_LOG(lvl_, ...)
 #endif
 
 #define BMA253_NOTIFY_MASK  0x01
 #define BMA253_READ_MASK    0x02
 
+#define BMA253_DRV_CHECK_RC(rc)\
+    do {\
+        if (0 == rc) {\
 
 Review comment:
   I would make it != instead of empty statemnt

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services