Merge pull request #8687 from aabadie/pr/drivers/params/bh1750fvi

drivers/bh1750fvi: use new driver params scheme
This commit is contained in:
Martine Lenders 2018-03-07 15:09:44 +01:00 committed by GitHub
commit a3bac82bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,9 +40,11 @@ extern "C" {
#define BH1750FVI_PARAM_I2C_CLK (BH1750FVI_I2C_MAX_CLK) #define BH1750FVI_PARAM_I2C_CLK (BH1750FVI_I2C_MAX_CLK)
#endif #endif
#define BH1750FVI_PARAMS_DEFAULT {.i2c = BH1750FVI_PARAM_I2C, \ #ifndef BH1750FVI_PARAMS
#define BH1750FVI_PARAMS { .i2c = BH1750FVI_PARAM_I2C, \
.addr = BH1750FVI_PARAM_ADDR, \ .addr = BH1750FVI_PARAM_ADDR, \
.clk = BH1750FVI_PARAM_I2C_CLK} .clk = BH1750FVI_PARAM_I2C_CLK }
#endif
/**@}*/ /**@}*/
/** /**
@ -50,11 +52,7 @@ extern "C" {
*/ */
static const bh1750fvi_params_t bh1750fvi_params[] = static const bh1750fvi_params_t bh1750fvi_params[] =
{ {
#ifdef BH1750FVI_PARAMS_BOARD BH1750FVI_PARAMS
BH1750FVI_PARAMS_BOARD,
#else
BH1750FVI_PARAMS_DEFAULT,
#endif
}; };
#ifdef __cplusplus #ifdef __cplusplus