drivers/grove_ledbar: use new driver params scheme
This commit is contained in:
parent
8a6bed72bd
commit
ddbbf71c49
@ -54,23 +54,24 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief Default parameter settings
|
* @brief Default parameter settings
|
||||||
*/
|
*/
|
||||||
#define GROVE_LEDBAR_PARAMS { \
|
#ifndef GROVE_LEDBAR_PARAMS
|
||||||
.leds = 10, \
|
#define GROVE_LEDBAR_PARAMS { .leds = 10, \
|
||||||
.dir = GROVE_LEDBAR_DIR, \
|
.dir = GROVE_LEDBAR_DIR, \
|
||||||
.clk = GROVE_LEDBAR_CLK, \
|
.clk = GROVE_LEDBAR_CLK, \
|
||||||
.dat = GROVE_LEDBAR_DAT, \
|
.dat = GROVE_LEDBAR_DAT }
|
||||||
}
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SAUL info
|
||||||
|
*/
|
||||||
|
#define GROVE_LEDBAR_SAUL_INFO { .name = "Grove LED bar" }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Grove LED bar configuration
|
* @brief Grove LED bar configuration
|
||||||
*/
|
*/
|
||||||
static const grove_ledbar_params_t grove_ledbar_params[] =
|
static const grove_ledbar_params_t grove_ledbar_params[] =
|
||||||
{
|
{
|
||||||
#ifdef GROVE_LEDBAR_CUSTOM
|
|
||||||
GROVE_LEDBAR_CUSTOM,
|
|
||||||
#else
|
|
||||||
GROVE_LEDBAR_PARAMS,
|
GROVE_LEDBAR_PARAMS,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,9 +79,7 @@ static const grove_ledbar_params_t grove_ledbar_params[] =
|
|||||||
*/
|
*/
|
||||||
static const saul_reg_info_t grove_ledbar_saul_info[] =
|
static const saul_reg_info_t grove_ledbar_saul_info[] =
|
||||||
{
|
{
|
||||||
{
|
GROVE_LEDBAR_SAUL_INFO
|
||||||
.name = "Grove LED bar"
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user