mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
drivers/jc42: More formatting fixes
This commit is contained in:
parent
01092dd7ca
commit
3545073f49
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user