Merge pull request #8675 from aabadie/pr/drivers/params/lpd8808

drivers/lpd8808: use new driver params scheme
This commit is contained in:
Martine Lenders 2018-03-07 14:12:11 +01:00 committed by GitHub
commit e5a9a0d626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,9 +39,11 @@ extern "C" {
#define LPD8808_PARAM_PIN_DAT (GPIO_PIN(0, 1)) #define LPD8808_PARAM_PIN_DAT (GPIO_PIN(0, 1))
#endif #endif
#define LPD8808_PARAMS_DEFAULT {.led_cnt = LPD8808_PARAM_LED_CNT, \ #ifndef LPD8808_PARAMS
.pin_clk = LPD8808_PARAM_PIN_CLK, \ #define LPD8808_PARAMS { .led_cnt = LPD8808_PARAM_LED_CNT, \
.pin_dat = LPD8808_PARAM_PIN_DAT } .pin_clk = LPD8808_PARAM_PIN_CLK, \
.pin_dat = LPD8808_PARAM_PIN_DAT }
#endif
/**@}*/ /**@}*/
/** /**
@ -49,11 +51,7 @@ extern "C" {
*/ */
static const lpd8808_params_t lpd8808_params[] = static const lpd8808_params_t lpd8808_params[] =
{ {
#ifdef LPD8808_PARAMS_BOARD LPD8808_PARAMS
LPD8808_PARAMS_BOARD,
#else
LPD8808_PARAMS_DEFAULT,
#endif
}; };
#ifdef __cplusplus #ifdef __cplusplus