Browse Source

drivers/jc42 Minor formatting

pr/spi.typo
Koen Zandberg 6 years ago
parent
commit
01092dd7ca
  1. 6
      drivers/jc42/include/jc42_internal.h
  2. 4
      drivers/jc42/include/jc42_params.h
  3. 5
      sys/auto_init/saul/auto_init_jc42.c

6
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)
/** @} */

4
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 }
/**@}*/
/**

5
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;

Loading…
Cancel
Save