From 01092dd7caf33d6fd5f57e0dce37067d667a96b8 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Thu, 5 Jan 2017 17:22:26 +0100 Subject: [PATCH] drivers/jc42 Minor formatting --- drivers/jc42/include/jc42_internal.h | 6 +++--- drivers/jc42/include/jc42_params.h | 4 ++-- sys/auto_init/saul/auto_init_jc42.c | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/jc42/include/jc42_internal.h b/drivers/jc42/include/jc42_internal.h index 8b83fc8c48..dbafae7028 100644 --- a/drivers/jc42/include/jc42_internal.h +++ b/drivers/jc42/include/jc42_internal.h @@ -27,8 +27,8 @@ extern "C" { * @name JC42 register addresses * @{ */ -#define JC42_REG_CAP (0x00) -#define JC42_REG_CONFIG (0x01) +#define JC42_REG_CAP (0x00) +#define JC42_REG_CONFIG (0x01) #define JC42_REG_TEMP_UPPER (0x02) #define JC42_REG_TEMP_LOWER (0x03) #define JC42_REG_TEMP_CRITICAL (0x04) @@ -36,7 +36,7 @@ extern "C" { #define JC42_REG_MANID (0x06) #define JC42_REG_DEVICEID (0x07) -#define jc42_BUS_FREE_TIME_US (1) +#define jc42_BUS_FREE_TIME_US (1) /** @} */ diff --git a/drivers/jc42/include/jc42_params.h b/drivers/jc42/include/jc42_params.h index 375b9b041a..a8716fbd18 100644 --- a/drivers/jc42/include/jc42_params.h +++ b/drivers/jc42/include/jc42_params.h @@ -43,8 +43,8 @@ extern "C" { #endif #define JC42_PARAMS_DEFAULT {.i2c = JC42_PARAM_I2C_DEV, \ - .speed = JC42_PARAM_SPEED, \ - .addr = JC42_PARAM_ADDR } + .speed = JC42_PARAM_SPEED, \ + .addr = JC42_PARAM_ADDR } /**@}*/ /** diff --git a/sys/auto_init/saul/auto_init_jc42.c b/sys/auto_init/saul/auto_init_jc42.c index 180650da5a..21a2fb69f7 100644 --- a/sys/auto_init/saul/auto_init_jc42.c +++ b/sys/auto_init/saul/auto_init_jc42.c @@ -63,13 +63,12 @@ void auto_init_jc42(void) { for (unsigned i = 0; i < JC42_NUMOF; i++) { const jc42_params_t *p = &jc42_params[i]; - if (jc42_init(&jc42_devs[i], - (jc42_params_t*) p) < 0) { + if (jc42_init(&jc42_devs[i], (jc42_params_t*) p) < 0) + { LOG_ERROR("Unable to initialize jc42 sensor #%i\n", i); return; } - /* temperature */ saul_entries[i].dev = &(jc42_devs[i]); saul_entries[i].name = jc42_saul_reg_info[i].name;