Skip to content

Commit

Permalink
Merge pull request #8681 from aabadie/pr/drivers/params/ds1307
Browse files Browse the repository at this point in the history
drivers/ds1307: use new driver params scheme
  • Loading branch information
miri64 committed Mar 7, 2018
2 parents 674777f + d4215e4 commit d2534b8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/ds1307/include/ds1307_params.h
Expand Up @@ -34,10 +34,11 @@ extern "C" {
#endif
#ifndef DS1307_PARAM_I2C_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 }

#endif
/** @} */

Expand All @@ -46,11 +47,7 @@ extern "C" {
*/
static const ds1307_params_t ds1307_params[] =
{
#ifdef DS1307_PARAMS_BOARD
DS1307_PARAMS_BOARD,
#else
DS1307_PARAMS_DEFAULT,
#endif
DS1307_PARAMS
};

#ifdef __cplusplus
Expand Down

0 comments on commit d2534b8

Please sign in to comment.