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/21 22:06:16 UTC

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

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



##########
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:
       @vrahane Thanks, I did it this way to make it work for both lis2dk10 and lis2dh12. If you want, I can add a syscfg and use the old behavior unless the syscfg is set. 




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