You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2019/07/17 22:28:25 UTC

[mynewt-core] branch master updated: hw/bma253: fix build (#1916)

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

vipulrahane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 0864471  hw/bma253: fix build (#1916)
0864471 is described below

commit 08644715b3560b8ccae85706aad3fd76d0fdc326
Author: Vipul Rahane <vi...@apache.org>
AuthorDate: Wed Jul 17 15:28:20 2019 -0700

    hw/bma253: fix build (#1916)
---
 hw/drivers/sensors/bma253/src/bma253.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/drivers/sensors/bma253/src/bma253.c b/hw/drivers/sensors/bma253/src/bma253.c
index 49a687b..a042ab2 100644
--- a/hw/drivers/sensors/bma253/src/bma253.c
+++ b/hw/drivers/sensors/bma253/src/bma253.c
@@ -55,7 +55,7 @@
         }\
     } while (0);
 
-const struct bma253_notif_cfg bma253_notif_cfg[] = {
+const struct bma253_notif_cfg dflt_bma253_notif_cfg[] = {
     {
       .event     = SENSOR_EVENT_TYPE_SINGLE_TAP,
       .notif_src = BMA253_SINGLE_TAP_SRC,
@@ -5160,7 +5160,7 @@ sensor_driver_set_trigger_thresh(struct sensor * sensor,
 {
 #if MYNEWT_VAL(BMA253_INT_ENABLE)
     struct bma253 * bma253;
-    //const struct bma253_cfg * cfg;
+    const struct bma253_cfg *cfg;
     int rc;
     enum bma253_power_mode request_power[3];
     const struct sensor_accel_data * low_thresh;
@@ -5176,7 +5176,7 @@ sensor_driver_set_trigger_thresh(struct sensor * sensor,
     }
 
     bma253 = (struct bma253 *)SENSOR_GET_DEVICE(sensor);
-    //cfg = &bma253->cfg;
+    cfg = &bma253->cfg;
     pdd = &bma253->pdd;
 
     pdd->read_ctx.srec_type |= sensor_type;
@@ -5628,8 +5628,8 @@ bma253_config(struct bma253 * bma253, struct bma253_cfg * cfg)
         return rc;
     }
     if (!cfg->notif_cfg) {
-        bma253->cfg.notif_cfg = (struct bma253_notif_cfg *)bma253_notif_cfg;
-        bma253->cfg.max_num_notif = sizeof(bma253_notif_cfg)/sizeof(*bma253_notif_cfg);
+        bma253->cfg.notif_cfg = (struct bma253_notif_cfg *)dflt_bma253_notif_cfg;
+        bma253->cfg.max_num_notif = sizeof(dflt_bma253_notif_cfg)/sizeof(*dflt_bma253_notif_cfg);
     } else {
         bma253->cfg.notif_cfg = cfg->notif_cfg;
         bma253->cfg.max_num_notif = cfg->max_num_notif;