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 2018/03/26 12:02:43 UTC

[GitHub] rymanluk commented on a change in pull request #699: Sensors/BMA2XX - New PR based on PR #697 changes

rymanluk commented on a change in pull request #699: Sensors/BMA2XX - New PR based on PR #697 changes
URL: https://github.com/apache/mynewt-core/pull/699#discussion_r177065234
 
 

 ##########
 File path: hw/sensor/creator/src/sensor_creator.c
 ##########
 @@ -508,6 +543,51 @@ config_bma253_sensor(void)
 }
 #endif
 
+#if MYNEWT_VAL(BMA2XX_OFB)
+/**
+ * BMA2XX sensor default configuration
+ *
+ * @return 0 on success, non-zero on failure
+ */
+int
+config_bma2xx_sensor(void)
+{
+    struct os_dev * dev;
+    struct bma2xx_cfg cfg;
+    int rc;
+
+    dev = os_dev_open("bma2xx_0", OS_TIMEOUT_NEVER, NULL);
+    assert(dev != NULL);
+
+    cfg.model = BMA2XX_BMA280;
 
 Review comment:
   The issue I see here is that sensor_creator.c creates only one `bm2xx_0`, so if somebody want to make use of this driver for more then one sensor he needs to modify sensor_creator.c.  It would be nice to have possibility to configure it in other way. Anyway, this can be handled later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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