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 2021/05/28 08:15:30 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request #2607: sensor_creator: Add non-bus driver SPI config for LIS2DW12

kasjer opened a new pull request #2607:
URL: https://github.com/apache/mynewt-core/pull/2607


   LIS2DW12 could be used with SPI and I2C when bus driver was used.
   SPI configuration was missing for non-bus driver usage.
   
   This also restores default I2C interface number 0 for LIS2DW12.
   


-- 
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



[GitHub] [mynewt-core] kasjer commented on a change in pull request #2607: sensor_creator: Add non-bus driver SPI config for LIS2DW12

Posted by GitBox <gi...@apache.org>.
kasjer commented on a change in pull request #2607:
URL: https://github.com/apache/mynewt-core/pull/2607#discussion_r641790355



##########
File path: hw/sensor/creator/src/sensor_creator.c
##########
@@ -624,19 +624,23 @@ static struct sensor_itf lis2dw12_itf = {
     }
 };
 #else
+static struct sensor_itf lis2dw12_itf = {
 #if MYNEWT_VAL(LIS2DW12_OFB_I2C_NUM) >= 0
-static struct sensor_itf i2c_0_itf_lis2dw12 = {
     .si_type = SENSOR_ITF_I2C,
     .si_num = MYNEWT_VAL(LIS2DW12_OFB_I2C_NUM),
     .si_addr = MYNEWT_VAL(LIS2DW12_OFB_ITF_ADDR),
+#elif MYNEWT_VAL(LIS2DW12_OFB_SPI_NUM) >= 0
+    .si_type = SENSOR_ITF_SPI,
+    .si_num = MYNEWT_VAL(LIS2DW12_OFB_SPI_NUM),
+    .si_cs_pin = MYNEWT_VAL(BME280_OFB_CS),

Review comment:
       Yeap, it was a rush job to fix coverity build, thanks for spotting.
   Fix is coming #2609 




-- 
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



[GitHub] [mynewt-core] vikrant-proxy commented on a change in pull request #2607: sensor_creator: Add non-bus driver SPI config for LIS2DW12

Posted by GitBox <gi...@apache.org>.
vikrant-proxy commented on a change in pull request #2607:
URL: https://github.com/apache/mynewt-core/pull/2607#discussion_r641658509



##########
File path: hw/sensor/creator/src/sensor_creator.c
##########
@@ -624,19 +624,23 @@ static struct sensor_itf lis2dw12_itf = {
     }
 };
 #else
+static struct sensor_itf lis2dw12_itf = {
 #if MYNEWT_VAL(LIS2DW12_OFB_I2C_NUM) >= 0
-static struct sensor_itf i2c_0_itf_lis2dw12 = {
     .si_type = SENSOR_ITF_I2C,
     .si_num = MYNEWT_VAL(LIS2DW12_OFB_I2C_NUM),
     .si_addr = MYNEWT_VAL(LIS2DW12_OFB_ITF_ADDR),
+#elif MYNEWT_VAL(LIS2DW12_OFB_SPI_NUM) >= 0
+    .si_type = SENSOR_ITF_SPI,
+    .si_num = MYNEWT_VAL(LIS2DW12_OFB_SPI_NUM),
+    .si_cs_pin = MYNEWT_VAL(BME280_OFB_CS),

Review comment:
       shouldn't this be `LIS2DW12_OFB_CS` ?




-- 
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



[GitHub] [mynewt-core] kasjer merged pull request #2607: sensor_creator: Add non-bus driver SPI config for LIS2DW12

Posted by GitBox <gi...@apache.org>.
kasjer merged pull request #2607:
URL: https://github.com/apache/mynewt-core/pull/2607


   


-- 
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