Browse Source

drivers/jc42: More formatting fixes

pr/spi.typo
Koen Zandberg 6 years ago
parent
commit
3545073f49
  1. 6
      drivers/jc42/jc42.c
  2. 3
      sys/auto_init/saul/auto_init_jc42.c

6
drivers/jc42/jc42.c

@ -72,7 +72,7 @@ int jc42_get_temperature(jc42_t* dev, uint16_t* temperature)
uint16_t tmp;
/* Read temperature */
if(jc42_get_register(dev, JC42_REG_TEMP, &tmp) != 0) {
if (jc42_get_register(dev, JC42_REG_TEMP, &tmp) != 0) {
return JC42_NODEV;
}
tmp = NTOHS(tmp);
@ -87,7 +87,7 @@ int jc42_init(jc42_t* dev, jc42_params_t* params)
dev->i2c = params->i2c;
dev->addr = params->addr;
i2c_acquire(dev->i2c);
if(i2c_init_master(dev->i2c, params->speed) != 0) {
if (i2c_init_master(dev->i2c, params->speed) != 0) {
DEBUG("[jc42] Problem initializing I2C master\n");
i2c_release(dev->i2c);
return JC42_NOI2C;
@ -95,7 +95,7 @@ int jc42_init(jc42_t* dev, jc42_params_t* params)
i2c_release(dev->i2c);
/* Poll the device, fail if unavailable */
if(jc42_get_config(dev, &config) != 0) {
if (jc42_get_config(dev, &config) != 0) {
return JC42_NODEV;
}

3
sys/auto_init/saul/auto_init_jc42.c

@ -63,8 +63,7 @@ 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;
}

Loading…
Cancel
Save