/*
 * led_matrix.h: main skull led matrix handling prototypes
 * 2014 true
**/

#ifndef __LED_LED_MATRIX_H
#define __LED_LED_MATRIX_H



/* struct */
typedef struct LEDFixedPattern {
	uint16_t wait;
	uint32_t led[8];
} LEDFixedPattern;



/* constants */
#define LED_MATRIX_PROG_COUNT 	6

/* interface */
#define LED_MATRIX_WHITE 		0
#define LED_MATRIX_PURPLE 		1

/* programs */
#define LED_MATRIX_MODE_OFF 	0
#define LED_MATRIX_MODE_PROGRAM 2


/* variables */
extern const char led_matrix_prog_name[LED_MATRIX_PROG_COUNT][16];


/* prototypes */
void led_matrix_io_init();
void led_matrix_io_disable();
void led_matrix_next();

void led_matrix_mode_update();
void led_matrix_set_mode(uint8_t mode); 	// used for turning off
void led_matrix_set_program(uint8_t program_idx, uint8_t init,
		uint16_t wait, uint16_t level, uint32_t offset, uint32_t settings);



#endif /* __LED_LED_MATRIX_H */
