X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=bike-lights.git;a=blobdiff_plain;f=firmware%2Fpattern.c;h=2e06b67e476fca2c35dad4fe0ef7e39648bff413;hp=78f988034fad04bfe0432aeac18d0a566f23c31c;hb=59eca43bd94de2fc23cff584306cdd666a1598e2;hpb=b5f2360e2efefeb664add9043bf17dedf91ae085 diff --git a/firmware/pattern.c b/firmware/pattern.c index 78f9880..2e06b67 100644 --- a/firmware/pattern.c +++ b/firmware/pattern.c @@ -2,20 +2,19 @@ #include "lights.h" -typedef struct { - unsigned char mode: 3; - unsigned char duration: 5; -} pattern_t; - static unsigned char led_counters[N_LEDS]; static pattern_t *led_patterns[N_LEDS]; -#define PATTERN_END { 0, 0 } pattern_t off_pattern[] = { { 0, 0x1F }, PATTERN_END }; +pattern_t on_pattern[] = { + { 1, 0x1F }, + PATTERN_END +}; + pattern_t blink_pattern[] = { { 1, 0x4 }, { 0, 0x8 },