From 68b5f182af145fdd9e62c9dde3eedcb9108f5ba4 Mon Sep 17 00:00:00 2001 From: Tobias Wiese Date: Mon, 3 May 2021 23:58:30 +0200 Subject: Initial commit Signed-off-by: Tobias Wiese --- test.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test.c (limited to 'test.c') diff --git a/test.c b/test.c new file mode 100644 index 0000000..176223f --- /dev/null +++ b/test.c @@ -0,0 +1,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]); +} -- cgit v1.2.3