blob: 7bf248f9ee6a406024ea6e6e78082f065a2acd83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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]));
}
}
|