drivers: led: pwm: use DT_INST_FOREACH_CHILD_SEP
Remove the need for auxiliary macros by using DT_INST_FOREACH_CHILD_SEP. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
18454e46f2
commit
44552df4f5
1 changed files with 1 additions and 3 deletions
|
@ -131,12 +131,10 @@ static const struct led_driver_api led_pwm_api = {
|
|||
.set_brightness = led_pwm_set_brightness,
|
||||
};
|
||||
|
||||
#define PWM_DT_SPEC_GET_AND_COMMA(node_id) PWM_DT_SPEC_GET(node_id),
|
||||
|
||||
#define LED_PWM_DEVICE(id) \
|
||||
\
|
||||
static const struct pwm_dt_spec led_pwm_##id[] = { \
|
||||
DT_INST_FOREACH_CHILD(id, PWM_DT_SPEC_GET_AND_COMMA) \
|
||||
DT_INST_FOREACH_CHILD_SEP(id, PWM_DT_SPEC_GET, (,)) \
|
||||
}; \
|
||||
\
|
||||
static const struct led_pwm_config led_pwm_config_##id = { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue