Skip to content

Instantly share code, notes, and snippets.

@toinetoine
Created February 28, 2016 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toinetoine/41e6bb82e08cb32ea5c9 to your computer and use it in GitHub Desktop.
Save toinetoine/41e6bb82e08cb32ea5c9 to your computer and use it in GitHub Desktop.
#include "datastructs.h"
#define nitems(x) (sizeof(x) / sizeof((x)[0]))
static unsigned short spiral_data[LED_COUNT] = {
LED(0), LED(1), LED(2), LED(3),
LED(4), LED(5), LED(6), LED(7),
LED(8), LED(9), LED(10)
};
struct frame spiral {
.data = spiral_data,
.resolution = nitems(spiral_data);
};
static unsigned short pacman_data[4] = {
ALL_LEDS, ALL_LEDS, ALL_LEDS, 0
};
struct frame pacman {
.data = pacman_data,
.resolution = nitems(pacman_data);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment