Merge pull request #8681 from aabadie/pr/drivers/params/ds1307
drivers/ds1307: use new driver params scheme
This commit is contained in:
commit
d2534b8a29
@ -34,10 +34,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#ifndef DS1307_PARAM_I2C_CLK
|
#ifndef DS1307_PARAM_I2C_CLK
|
||||||
#define DS1307_PARAM_I2C_CLK (DS1307_I2C_MAX_CLK)
|
#define DS1307_PARAM_I2C_CLK (DS1307_I2C_MAX_CLK)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DS1307_PARAMS_DEFAULT { .i2c = DS1307_PARAM_I2C, \
|
#ifndef DS1307_PARAMS
|
||||||
|
#define DS1307_PARAMS { .i2c = DS1307_PARAM_I2C, \
|
||||||
.clk = DS1307_PARAM_I2C_CLK }
|
.clk = DS1307_PARAM_I2C_CLK }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@ -46,11 +47,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
static const ds1307_params_t ds1307_params[] =
|
static const ds1307_params_t ds1307_params[] =
|
||||||
{
|
{
|
||||||
#ifdef DS1307_PARAMS_BOARD
|
DS1307_PARAMS
|
||||||
DS1307_PARAMS_BOARD,
|
|
||||||
#else
|
|
||||||
DS1307_PARAMS_DEFAULT,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user