/*
 * led.h -	Constants & declarations associated with the LEDs on
 *		the Phoenix PRI adapter.
 *
 *		@(#) $Id: led.h,v 1.6 1996/11/08 21:29:38 gary Exp $
 *
 *		There are 4 bi-colour leds associated with each channel,
 *		each group of 4 is controlled by a byte-wide write only
 *		register. Each led is wired between consecutive bits of
 *		the latch, giving rise to the following behaviour:
 *
 *			Bit n+1	Bit n	Colour
 *			======================
 *			0	0	Off
 *			0	1	Red
 *			1	0	Green
 *			1	1	Off
 *
 *              The LEDs on ISA PRI cards are numbered as follows:
 *
 *                     +-----+    3   1           +-----+    7   5
 *                     |     |    2   0           |     |    6   4
 *               ------+-----+--------------------+-----+------------------
 *
 *              The LEDs on PCI PRI cards are numbered as follows:
 *
 *                                        +-----+    3   1
 *                                        |     |    2   0
 *               -------------------------+-----+--------------------------
 *
 */

#ifndef	__LED_H__
#define	__LED_H__

/*
 * The various states for the LEDs.
 */
#define	LED_OFF		0x00
#define	LED_RED		0x01
#define	LED_GREEN	0x02

/*
 * Sentinal used to test the state argument.
 */
#define	LED_LAST_STATE	LED_GREEN

/*
 * Symbolic names for LEDs, as shown in the PRI manual.
 */
#define	LED_LINE1_1A	1
#define	LED_LINE1_1B	0
#define	LED_LINE1_2A	3
#define	LED_LINE1_2B	2
#define	LED_LINE2_1A	5
#define	LED_LINE2_1B	4
#define	LED_LINE2_2A	7
#define	LED_LINE2_2B	6

/*
 * Initial value of LED0/1 - placed in our static variables by
 * compiler, and stuffed into the hardware registers very early
 * during initialisation. 0x55 happens to be all red.
 */
#define	LEDINIT	0x55

#ifndef LANGUAGE_ASSEMBLY		/* If not in the assembler... */
/*
 * Template for interface.
 */
void	SetLedState(unsigned int Ordinal, unsigned int State) ;
#endif
#endif
