diff options
Diffstat (limited to 'blink.c')
| -rw-r--r-- | blink.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#include <util/delay.h> +#include "libleds.h" + +static struct led_obj const PANEL = {0, 1<<7, 32, 8}; +static unsigned char const INTENSITY = 0x15; +static unsigned int const DELAY_MS = 150; + +void led_main() +{ + struct led_color const colors[] = { + {INTENSITY, 0x00, 0x00}, + {0x00, INTENSITY, 0x00}, + {0x00, 0x00, INTENSITY}, + }; + + unsigned char i = 0; + + while (1) { + led_write_rgb_all(PANEL, colors[i]); + _delay_ms(DELAY_MS); + i = (i + 1) % (sizeof(colors) / sizeof(colors[0])); + } +} |
