/*
	
	This code will drive the Memecode MLR1 LED ring.

*/
#ifndef _LED_RING_H_
#define _LED_RING_H_

#include "defs.h"

// The port used is defined by the SPI code which this depends on.

/// The available colours
enum LedColours
{
	LedBlue = 0x1,
	LedGreen = 0x2,
	LedRed = 0x4,
	LedWhite = LedBlue|LedGreen|LedRed,
};

/// Sets the colour of the LED ring stored in 'Ring'. After all
/// colours are set, call LedRingUpdate to push the changes out
/// to the hardware.
extern void LedRing_SetColour
(
	/// All the bits for the LEDs in 3 uint16's
	uint16 *Ring,
	/// The LED to change [0-15].
	int Led,
	/// The RGB colour to use. A combination of #RED, #GREEN and #BLUE flags.
	int Colour
);

/// This updates the hardware with the values in 'Ring' via SPI.
extern void LedRing_Update(uint16 *Ring);

#endif