Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A01A5200BE8 for ; Fri, 23 Dec 2016 18:19:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9EB64160B1F; Fri, 23 Dec 2016 17:19:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B8A9C160B0C for ; Fri, 23 Dec 2016 18:19:21 +0100 (CET) Received: (qmail 19902 invoked by uid 500); 23 Dec 2016 17:19:20 -0000 Mailing-List: contact commits-help@mynewt.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mynewt.incubator.apache.org Delivered-To: mailing list commits@mynewt.incubator.apache.org Received: (qmail 19893 invoked by uid 99); 23 Dec 2016 17:19:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2016 17:19:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 63367C126A for ; Fri, 23 Dec 2016 17:19:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id KcBr0VUOSryD for ; Fri, 23 Dec 2016 17:19:19 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 785F15F1C2 for ; Fri, 23 Dec 2016 17:19:18 +0000 (UTC) Received: (qmail 16847 invoked by uid 99); 23 Dec 2016 17:19:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2016 17:19:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 66E44DFBA3; Fri, 23 Dec 2016 17:19:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sterling@apache.org To: commits@mynewt.incubator.apache.org Message-Id: <7d191d1ae8374a59b5d3d2acca8e17d2@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-mynewt-core git commit: move #if to beginning of line. Date: Fri, 23 Dec 2016 17:19:01 +0000 (UTC) archived-at: Fri, 23 Dec 2016 17:19:22 -0000 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 Authored: Fri Dec 23 09:18:51 2016 -0800 Committer: Sterling Hughes 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: