You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by st...@apache.org on 2016/12/23 17:19:01 UTC

incubator-mynewt-core git commit: move #if to beginning of line.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/sensors_branch ca8be8d3f -> 68986fbd7


move #if to beginning of line.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/68986fbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/68986fbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/68986fbd

Branch: refs/heads/sensors_branch
Commit: 68986fbd71a90f779765ca0e5022084c072dff7a
Parents: ca8be8d
Author: Sterling Hughes <st...@apache.org>
Authored: Fri Dec 23 09:18:51 2016 -0800
Committer: Sterling Hughes <st...@apache.org>
Committed: Fri Dec 23 09:18:51 2016 -0800

----------------------------------------------------------------------
 hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c | 44 ++++++++++-----------
 1 file changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/68986fbd/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c
----------------------------------------------------------------------
diff --git a/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c b/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c
index a4f4996..40978c6 100644
--- a/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c
+++ b/hw/drivers/sensors/lsm303dlhc/src/lsm303dlhc.c
@@ -111,9 +111,9 @@ lsm303dlhc_write8(uint8_t addr, uint8_t reg, uint32_t value)
     if (rc) {
         LSM303DLHC_ERR("Failed to write to 0x%02X:0x%02X with value 0x%02X\n",
                        addr, reg, value);
-        #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
         STATS_INC(g_lsm303dlhcstats, errors);
-        #endif
+#endif
     }
 
     return rc;
@@ -146,9 +146,9 @@ lsm303dlhc_read8(uint8_t addr, uint8_t reg, uint8_t *value)
                               OS_TICKS_PER_SEC / 10, 1);
     if (rc) {
         LSM303DLHC_ERR("I2C access failed at address 0x%02X\n", addr);
-        #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
         STATS_INC(g_lsm303dlhcstats, errors);
-        #endif
+#endif
         goto error;
     }
 
@@ -159,9 +159,9 @@ lsm303dlhc_read8(uint8_t addr, uint8_t reg, uint8_t *value)
     *value = payload;
     if (rc) {
         LSM303DLHC_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg);
-        #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
         STATS_INC(g_lsm303dlhcstats, errors);
-        #endif
+#endif
     }
 
 error:
@@ -185,9 +185,9 @@ lsm303dlhc_read48(uint8_t addr, uint8_t reg, int16_t *x, int16_t*y, int16_t *z)
                               OS_TICKS_PER_SEC / 10, 1);
     if (rc) {
         LSM303DLHC_ERR("I2C access failed at address 0x%02X\n", addr);
-        #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
         STATS_INC(g_lsm303dlhcstats, errors);
-        #endif
+#endif
         goto error;
     }
 
@@ -204,9 +204,9 @@ lsm303dlhc_read48(uint8_t addr, uint8_t reg, int16_t *x, int16_t*y, int16_t *z)
 
     if (rc) {
         LSM303DLHC_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg);
-        #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
         STATS_INC(g_lsm303dlhcstats, errors);
-        #endif
+#endif
         goto error;
     }
 
@@ -234,13 +234,13 @@ lsm303dlhc_init(struct os_dev *dev, void *arg)
 
     lsm = (struct lsm303dlhc *) dev;
 
-    #if MYNEWT_VAL(LSM303DLHC_LOG)
+#if MYNEWT_VAL(LSM303DLHC_LOG)
     log_register("lsm303dlhc", &_log, &log_console_handler, NULL, LOG_SYSLEVEL);
-    #endif
+#endif
 
     sensor = &lsm->sensor;
 
-    #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
     /* Initialise the stats entry */
     rc = stats_init(
         STATS_HDR(g_lsm303dlhcstats),
@@ -250,7 +250,7 @@ lsm303dlhc_init(struct os_dev *dev, void *arg)
     /* Register the entry with the stats registry */
     rc = stats_register("lsm303dlhc", STATS_HDR(g_lsm303dlhcstats));
     SYSINIT_PANIC_ASSERT(rc == 0);
-    #endif
+#endif
 
     rc = sensor_init(sensor, dev);
     if (rc != 0) {
@@ -333,27 +333,27 @@ lsm303dlhc_sensor_read(struct sensor *sensor, sensor_type_t type,
     /* Determine mg per lsb based on range */
     switch(lsm->cfg.accel_range) {
         case LSM303DLHC_ACCEL_RANGE_2:
-            #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
             STATS_INC(g_lsm303dlhcstats, samples_acc_2g);
-            #endif
+#endif
             mg_lsb = 0.001F;
             break;
         case LSM303DLHC_ACCEL_RANGE_4:
-            #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
             STATS_INC(g_lsm303dlhcstats, samples_acc_4g);
-            #endif
+#endif
             mg_lsb = 0.002F;
             break;
         case LSM303DLHC_ACCEL_RANGE_8:
-            #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
             STATS_INC(g_lsm303dlhcstats, samples_acc_8g);
-            #endif
+#endif
             mg_lsb = 0.004F;
             break;
         case LSM303DLHC_ACCEL_RANGE_16:
-            #if MYNEWT_VAL(LSM303DLHC_STATS)
+#if MYNEWT_VAL(LSM303DLHC_STATS)
             STATS_INC(g_lsm303dlhcstats, samples_acc_16g);
-            #endif
+#endif
             mg_lsb = 0.012F;
             break;
         default: