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 20:04:24 UTC

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

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