1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/jc42: use new driver params scheme

This commit is contained in:
Alexandre Abadie 2018-02-28 16:47:27 +01:00
parent 2e066e8693
commit b345903598

View File

@ -43,9 +43,14 @@ extern "C" {
#define JC42_PARAM_SPEED I2C_SPEED_FAST #define JC42_PARAM_SPEED I2C_SPEED_FAST
#endif #endif
#define JC42_PARAMS_DEFAULT { .i2c = JC42_PARAM_I2C_DEV, \ #ifndef JC42_PARAMS
.speed = JC42_PARAM_SPEED, \ #define JC42_PARAMS { .i2c = JC42_PARAM_I2C_DEV, \
.speed = JC42_PARAM_SPEED, \
.addr = JC42_PARAM_ADDR } .addr = JC42_PARAM_ADDR }
#endif
#ifndef JC42_SAUL_INFO
#define JC42_SAUL_INFO { .name= "jc42" }
#endif
/**@}*/ /**@}*/
/** /**
@ -53,19 +58,15 @@ extern "C" {
*/ */
static const jc42_params_t jc42_params[] = static const jc42_params_t jc42_params[] =
{ {
#ifdef JC42_PARAMS_BOARD JC42_PARAMS
JC42_PARAMS_BOARD,
#else
JC42_PARAMS_DEFAULT,
#endif
}; };
/** /**
* @brief Configure SAUL registry entries * @brief Configure SAUL registry entries
*/ */
static const saul_reg_info_t jc42_saul_reg_info[] = static const saul_reg_info_t jc42_saul_info[] =
{ {
{ .name= "jc42" } JC42_SAUL_INFO
}; };
#ifdef __cplusplus #ifdef __cplusplus