summaryrefslogtreecommitdiffstats
path: root/test.c
blob: 176223fb8f42f7699813058a506a8b64101de56b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "libleds.h"

static struct led_obj const PANEL = {0, 1<<7, 32, 8};
static unsigned char const INTENSITY = 0x01;

void led_main()
{
	struct led_color const colors[] = {
		{0x0000000, 0x0000000, 0x0000000},
		{INTENSITY, 0x0000000, 0x0000000},
		{0x0000000, INTENSITY, 0x0000000},
		{INTENSITY, INTENSITY, 0x0000000},
		{0x0000000, 0x0000000, INTENSITY},
		{INTENSITY, 0x0000000, INTENSITY},
		{0x0000000, INTENSITY, INTENSITY},
		{INTENSITY, INTENSITY, INTENSITY},
	};

	for(int x = 0; x < PANEL.width; x++)
		for (int i = 0; i < (sizeof(colors) / sizeof(colors[0])); i++)
			led_write_rgb(PANEL.port, PANEL.pins, colors[i]);
}