drivers/jc42 Minor formatting
This commit is contained in:
parent
0f22e13ccb
commit
01092dd7ca
@ -27,8 +27,8 @@ extern "C" {
|
|||||||
* @name JC42 register addresses
|
* @name JC42 register addresses
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define JC42_REG_CAP (0x00)
|
#define JC42_REG_CAP (0x00)
|
||||||
#define JC42_REG_CONFIG (0x01)
|
#define JC42_REG_CONFIG (0x01)
|
||||||
#define JC42_REG_TEMP_UPPER (0x02)
|
#define JC42_REG_TEMP_UPPER (0x02)
|
||||||
#define JC42_REG_TEMP_LOWER (0x03)
|
#define JC42_REG_TEMP_LOWER (0x03)
|
||||||
#define JC42_REG_TEMP_CRITICAL (0x04)
|
#define JC42_REG_TEMP_CRITICAL (0x04)
|
||||||
@ -36,7 +36,7 @@ extern "C" {
|
|||||||
#define JC42_REG_MANID (0x06)
|
#define JC42_REG_MANID (0x06)
|
||||||
#define JC42_REG_DEVICEID (0x07)
|
#define JC42_REG_DEVICEID (0x07)
|
||||||
|
|
||||||
#define jc42_BUS_FREE_TIME_US (1)
|
#define jc42_BUS_FREE_TIME_US (1)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,8 +43,8 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define JC42_PARAMS_DEFAULT {.i2c = JC42_PARAM_I2C_DEV, \
|
#define JC42_PARAMS_DEFAULT {.i2c = JC42_PARAM_I2C_DEV, \
|
||||||
.speed = JC42_PARAM_SPEED, \
|
.speed = JC42_PARAM_SPEED, \
|
||||||
.addr = JC42_PARAM_ADDR }
|
.addr = JC42_PARAM_ADDR }
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -63,13 +63,12 @@ void auto_init_jc42(void)
|
|||||||
{
|
{
|
||||||
for (unsigned i = 0; i < JC42_NUMOF; i++) {
|
for (unsigned i = 0; i < JC42_NUMOF; i++) {
|
||||||
const jc42_params_t *p = &jc42_params[i];
|
const jc42_params_t *p = &jc42_params[i];
|
||||||
if (jc42_init(&jc42_devs[i],
|
if (jc42_init(&jc42_devs[i], (jc42_params_t*) p) < 0)
|
||||||
(jc42_params_t*) p) < 0) {
|
{
|
||||||
LOG_ERROR("Unable to initialize jc42 sensor #%i\n", i);
|
LOG_ERROR("Unable to initialize jc42 sensor #%i\n", i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* temperature */
|
/* temperature */
|
||||||
saul_entries[i].dev = &(jc42_devs[i]);
|
saul_entries[i].dev = &(jc42_devs[i]);
|
||||||
saul_entries[i].name = jc42_saul_reg_info[i].name;
|
saul_entries[i].name = jc42_saul_reg_info[i].name;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user