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 2022/03/17 00:59:19 UTC

[GitHub] [mynewt-core] vrahane commented on a change in pull request #2799: sensors/lis2dh12: Minor change to support lis2dk10

vrahane commented on a change in pull request #2799:
URL: https://github.com/apache/mynewt-core/pull/2799#discussion_r828572072



##########
File path: hw/drivers/sensors/lis2dh12/src/lis2dh12.c
##########
@@ -640,13 +640,20 @@ int
 lis2dh12_pull_up_disc(struct sensor_itf *itf, uint8_t disconnect)
 {
     uint8_t reg;
+    int rc;
 
-    reg = 0;
+    rc = lis2dh12_readlen(itf, LIS2DH12_REG_CTRL_REG0, &reg, 1);
+    if (rc) {

Review comment:
       @benmccrea I think it would be better to make the read of the bit conditional given it is not applicable for lis2dh12.




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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org