#include #include #include #include "libleds.h" #include "chars/chars.h" static struct led_obj const PANEL = {0, 1<<7, 32, 8}; void led_main() { // clear struct led_color const clear_color = { 0, 0, 0 }; led_write_rgb_all(PANEL, clear_color); const struct led_color active_color = {0x10, 0x10, 0x10}; const char *text = "0123"; struct led_color *buf = leds_text(active_color, text); if (buf == NULL) { return; } struct led_color const padding = { 0, 0, 0 }; for (unsigned int i = 0; i < 4*char_height; i++) led_write_rgb(PANEL.port, PANEL.pins, padding); for (unsigned int i = 0; i < char_length * strlen(text); i++) led_write_rgb(PANEL.port, PANEL.pins, buf[i]); free(buf); }