#include "libleds.h" static struct led_obj const PANEL = {0, 1<<7, 32, 8}; void update(int i) { struct led_color const color = {i, i, i}; led_write_rgb_all(PANEL, color); led_latch(); } void led_main() { static int const STEP = 0x01; static int const MIN = 0x00; static int const MAX = 0xFF; while (1) { for (int i = MIN; i < MAX; i += STEP) update(i); for (int i = MAX; i > MIN; i += STEP) update(i); } }