#ifndef CORSAIR_STRAFE2_H_
#define CORSAIR_STRAFE2_H_

enum
{
	CORSAIR_KEYBOARD_VID	= 0x1b1c,
	CORSAIR_STRAFE2_PID		= 0x1b48,
	NUM_KEYS				= 144,
	BUF_SIZE				= 64,
	NUM_PACKETS				= 16,
	NKRO_BUF_SIZE			= 21
};

void nkro2boot(uint8_t const* nkro_report, uint8_t* boot_report, uint16_t len) ;
uint8_t corsair2nkro(uint8_t const* corsair_report, uint8_t* nkro_report, uint16_t len);
void get_light();
void rgb_task(uint8_t dev_addr, uint8_t instance, uint8_t report_id);
void send_color(uint8_t dev_addr, uint8_t instance, uint8_t report_id,
	uint8_t red, uint8_t green, uint8_t blue);
void send_initial(uint8_t dev_addr, uint8_t instance, uint8_t report_id);
void startADC();

#define SET_KEYBIT(array, index) do { (array)[(index) / 8] |= 1 << ((index) % 8); } while(0)
#define CLEAR_KEYBIT(array, index) do { (array)[(index) / 8] &= ~(1 << ((index) % 8)); } while(0)

#endif
