You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2018/03/01 06:57:45 UTC

[mynewt-core] branch master updated: drv2605: stats ifdef fix (#862)

This is an automated email from the ASF dual-hosted git repository.

jacobrosenthal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 2cb0603  drv2605: stats ifdef fix (#862)
2cb0603 is described below

commit 2cb060365f317e36f8048a43e2adc94b04124aac
Author: Jacob Rosenthal <ja...@gmail.com>
AuthorDate: Wed Feb 28 23:57:44 2018 -0700

    drv2605: stats ifdef fix (#862)
---
 hw/drivers/drv2605/include/drv2605/drv2605.h | 3 ++-
 hw/drivers/drv2605/src/drv2605.c             | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/drivers/drv2605/include/drv2605/drv2605.h b/hw/drivers/drv2605/include/drv2605/drv2605.h
index ce5e661..2fb2a00 100644
--- a/hw/drivers/drv2605/include/drv2605/drv2605.h
+++ b/hw/drivers/drv2605/include/drv2605/drv2605.h
@@ -80,7 +80,8 @@ drv2605_config(struct drv2605 *drv2605, struct drv2605_cfg *cfg);
 
 
 #if MYNEWT_VAL(DRV2605_CLI)
-int drv2605_shell_init(void);
+int
+drv2605_shell_init(void);
 #endif
 
 
diff --git a/hw/drivers/drv2605/src/drv2605.c b/hw/drivers/drv2605/src/drv2605.c
index a724edc..16e0616 100644
--- a/hw/drivers/drv2605/src/drv2605.c
+++ b/hw/drivers/drv2605/src/drv2605.c
@@ -129,7 +129,9 @@ drv2605_writelen(struct sensor_itf *itf, uint8_t reg, uint8_t *buffer,
     rc = hal_i2c_master_write(itf->si_num, &data_struct, OS_TICKS_PER_SEC / 10, 1);
     if (rc) {
         DRV2605_ERR("I2C access failed at address 0x%02X\n", data_struct.address);
+#if MYNEWT_VAL(DRV2605_STATS)
         STATS_INC(g_drv2605stats, errors);
+#endif
         goto err;
     }
 

-- 
To stop receiving notification emails like this one, please contact
jacobrosenthal@apache.org.