Skip to content

Commit

Permalink
app: led: support CANnectivity channels without activity LEDs
Browse files Browse the repository at this point in the history
Support CANnectivity devicetree channels without activity LEDs.

Signed-off-by: Henrik Brix Andersen <[email protected]>
  • Loading branch information
henrikbrixandersen committed Dec 25, 2024
1 parent d7434f0 commit c9ca536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ struct led_ctx {
#define CHANNEL_LED_GPIO_DT_SPEC_GET(node_id) \
{ \
.state_led = GPIO_DT_SPEC_GET_OR(node_id, state_gpios, {0}), \
.activity_led = {DT_FOREACH_PROP_ELEM_SEP(node_id, activity_gpios, \
GPIO_DT_SPEC_GET_BY_IDX, (,))}, \
.activity_led[0] = GPIO_DT_SPEC_GET_BY_IDX_OR(node_id, activity_gpios, 0, {0}), \
.activity_led[1] = GPIO_DT_SPEC_GET_BY_IDX_OR(node_id, activity_gpios, 1, {0}), \
}

#define CHANNEL_LED0_GPIO_DT_SPEC_GET() \
Expand Down

0 comments on commit c9ca536

Please sign in to comment.