rgbyteclock-code/util.h

23 lines
476 B
C
Raw Permalink Normal View History

2014-03-15 05:47:41 +01:00
#define MAX_BRIGHTNESS 0x0800
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
#define COLOR_BLUE 4
#define COLOR_MAGENTA 5
#define COLOR_CYAN 6
#define COLOR_WHITE 7
#define BUTTON_NONE 0
#define BUTTON_LU 1
#define BUTTON_LO 2
#define BUTTON_RU 3
#define BUTTON_RO 4
void init_random( uint16_t lfsr );
uint16_t random( void );
void get_color( uint16_t *r, uint16_t *g, uint16_t *b, uint8_t colorIndex );
uint8_t get_button( void );