#include "internal.h" #define event_get_value(e) _event_get_value(__FILE__, __LINE__, __FUNCTION__, e) #define leds_max_location() _leds_max_location(__FILE__, __LINE__, __FUNCTION__) #define BLINK_CODE(...) \ ({ \ struct blink_code ___code = { .params = { 0, 0 }, \ .color = led->current_color, \ __VA_ARGS__ }; \ ___code; \ }) #define BLINK_CODE_SKIP BLINK_CODE(.type = blink_invalid) #define COLOR(name) \ static inline struct blink_code set_current_color_##name( \ struct led *led) \ { \ _led_set_current_color(led, led_color_name_##name); \ return BLINK_CODE_SKIP; \ } #include "../def/colors.h" #define OVERLAYS(...) \ (led_overlay_t[]) \ { \ __VA_ARGS__, NULL \ } #include "../def/leds.c" unsigned int num_led_types = sizeof(led_types) / sizeof(led_types[0]);