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/04/17 18:15:28 UTC

[GitHub] vrahane commented on a change in pull request #1033: lis2dw12: Add support for set/clear int cfg bits

vrahane commented on a change in pull request #1033: lis2dw12: Add support for set/clear int cfg bits
URL: https://github.com/apache/mynewt-core/pull/1033#discussion_r182178271
 
 

 ##########
 File path: hw/drivers/sensors/lis2dw12/src/lis2dw12.c
 ##########
 @@ -1949,92 +2034,93 @@ init_intpin(struct lis2dw12 *lis2dw12, hal_gpio_irq_handler_t handler,
 }
 
 static int
-enable_interrupt(struct sensor *sensor, uint8_t int_to_enable, uint8_t int_num)
+disable_interrupt(struct sensor *sensor, uint8_t int_to_disable, uint8_t int_num)
 {
     struct lis2dw12 *lis2dw12;
     struct lis2dw12_pdd *pdd;
     struct sensor_itf *itf;
-    uint8_t reg;
     int rc;
 
-    if (!int_to_enable) {
-        rc = SYS_EINVAL;
-        goto err;
+    if (int_to_disable == 0) {
+        return SYS_EINVAL;
     }
 
     lis2dw12 = (struct lis2dw12 *)SENSOR_GET_DEVICE(sensor);
     itf = SENSOR_GET_ITF(sensor);
     pdd = &lis2dw12->pdd;
 
-    rc = lis2dw12_clear_int(itf, &reg);
-    if (rc) {
-        goto err;
-    }
-
-    /* if no interrupts are currently in use enable int pin */
+    /* disable int pin */
     if (!pdd->int_enable) {
 
 Review comment:
   Taking care of this.

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