/*	Title	Pin Driver Definitions and Equates*/
/******************************************************************************/
/*     Use:								      */
/*	   SUPPLY1_POWER_DAC	to adjust the high power supply voltage       */
/*	   SUPPLY2_POWER_DAC	to adjust the medium power supply voltage     */
/*	   THRESH_HOLD_DAC	to adjust the read threshold reference	      */
/*	   SLEW_RATE_DAC	to set the slew rate of the UDN signals       */
/*	   HP_CONTROL_DAC	to set final regulation to high power pins    */
/*	   MP_CONTROL_DAC	to set final regulation to medium power pins  */
/*	   LP_CONTROL_DAC	to set final regulation to low power pins     */
/*	   PU_CONTROL_DAC	to set final regualtion to pullup power pins  */
/*									      */
/*     Use:								      */
/*	   DAC_REFERENCE_BIT	to control all DACS via the reference voltage */
/*	   LIMIT_RELAY_BIT	to control the current limit relay	      */
/******************************************************************************/
/*	Subttl	DAC and Special Address Definitions*/
#define ON	   0x01
#define OFF	   0x00

#define UdiLockPort0			0x310			/* udi lock-out port 0				*/
#define UdiLockPort1			0x311			/* udi lock-out port 1				*/
#define UdiMemMapPort			0x312			/* udi memory mapping port			*/
#define FifoCmdPort			0x313
#define FifoDataPort			0x312

								/* DACs in VPP hardware 			*/
#define SLEW_RATE_DAC			0x300			/* to set the slew rate of the UDN signals	*/
#define THRESH_HOLD_DAC 		0x301			/* to adjust the read threshold reference	*/
#define SUPPLY1_POWER_DAC		0x302			/* to adjust the high power supply voltage	*/
#define CURRENT_DAC			0x303			/* to adjust the current read threshold 	*/
#define PU_CONTROL_DAC			0x305			/* to set final regualtion to pullup power pins */
#define ANALOG_CONTROL			0x30C			/* analog control register(s), write only	*/
#define ANALOG_STATUS			0x30C			/* analog status register(s), read only 	*/

#define VIPV_DAC			0x386			/* Current pulse ... voltage limit DAC		*/
#define VIPI_DAC			0x387			/* Current pulse ... current limit DAC		*/
#define SEQUENCER_COUNTER		0x388			/* Sequencer counter register			*/
#define SEQUENCER_SHIFTER		0x389			/* Sequencer shift register			*/
#define SEQUENCER_RAM			0x38A			/* Sequencer RAM register			*/


#define ADJUSTABLE_SENSE		0x2e1			/* Adjustable supply voltage comparator (bit 0) */
#define UPPER_TEMP_SENSE		0x2e2			/* Upper temperature sensor comparator (bit 0)	*/
#define LOWER_TEMP_SENSE		0x2e3			/* Lower temperature sensor comparator (bit 0)	*/
#define CONTROLLER_THRESHOLD		0x2e3			/* Controller Theshold for reading comparators	*/
#define ENABLE_REG_ALL			0x297			/* Enable register (enable all) 		*/
#define ENABLE_REG_0			0x298			/* Enable register number 0			*/
#define ENABLE_REG_1			0x299			/* Enable register number 1			*/
#define ENABLE_REG_2			0x29a			/* Enable register number 2			*/
#define ENABLE_REG_3			0x29b			/* Enable register number 3			*/
#define ENABLE_REG_4			0x29c			/* Enable register number 4			*/
#define ENABLE_REG_5			0x29d			/* Enable register number 5			*/
#define ENABLE_REG_6			0x29e			/* Enable register number 6			*/
#define ENABLE_REG_7			0x29f			/* Enable register number 7			*/

#define PCLOCK				0x38b			/* Programmable Clock register address		*/

								/* control and switcher state bits		*/
#define DAC_REFERENCE_BIT		0x01			/* to control all DACS via the reference voltage*/
#define GREEN_LED_OFF_BIT		0x02			/* power on led control bit			*/

								/* definition of pin drivers on state flag	*/
#define DISCONNECT			0x0000			/* disconnect pin from all drivers		*/
#define GD_DRIVER_ON			0x0100			/* ground driver on				*/
#define SRC_DRIVER_ON			0x0200			/* source driver on				*/
#define CUR_DRIVER_ON			0x0400			/* current driver on				*/
#define TTL_HI_DRIVER_ON		0x0800			/* ttl high pin driver on			*/
#define PU_DRIVER_ON			0x1000			/* pullup power pin driver on			*/
#define TTL_LOW_DRIVER_ON		0x2000			/* ttl low pin driver on			*/
#define PD_DRIVER_ON			0x8000			/* pull-down	pin driver on			*/
#define CLK0_DRIVER_ON			0x4000			/* clock driver phase 0 on			*/
#define CLK1_DRIVER_ON			0x6000			/* clock driver phase 1 on			*/


#define COFFSET 			0x00			/* Configurator offset / pin			*/
#define DOFFSET 			0x03			/* Dac offset / pin				*/
								/* pin table offsets				*/
#define MAX_DEVICE_PINS 		88			/* Maximum number of device pins		*/

#define PIN_01_ADDRESS			0x0200			/* pin 1 base address				*/
#define PIN_02_ADDRESS			0x0210			/* pin 2 base address				*/
#define PIN_03_ADDRESS			0x0220			/* pin 3 base address				*/
#define PIN_04_ADDRESS			0x0230			/* pin 4 base address				*/
#define PIN_05_ADDRESS			0x0180			/* pin 5 base address				*/
#define PIN_06_ADDRESS			0x0190			/* pin 6 base address			       */
#define PIN_07_ADDRESS			0x01A0			/* pin 7 base address			       */
#define PIN_08_ADDRESS			0x01B0			/* pin 8 base address			       */
#define PIN_09_ADDRESS			0x0100			/* pin 9 base address			       */
#define PIN_10_ADDRESS			0x0110			/* pin 10 base address				*/
#define PIN_11_ADDRESS			0x0120			/* pin 11 base address				*/
#define PIN_12_ADDRESS			0x0130			/* pin 12 base address				*/
#define PIN_13_ADDRESS			0x0080			/* pin 13 base address				*/
#define PIN_14_ADDRESS			0x0090			/* pin 14 base address				*/
#define PIN_15_ADDRESS			0x00A0			/* pin 15 base address				*/
#define PIN_16_ADDRESS			0x00B0			/* pin 16 base address				*/
#define PIN_17_ADDRESS			0x0000			/* pin 17 base address				*/
#define PIN_18_ADDRESS			0x0010			/* pin 18 base address				*/
#define PIN_19_ADDRESS			0x0020			/* pin 19 base address				*/
#define PIN_20_ADDRESS			0x0030			/* pin 20 base address				*/
#define PIN_21_ADDRESS			0x0040			/* pin 21 base address				*/
#define PIN_22_ADDRESS			0x0050			/* pin 22 base address				*/
#define PIN_23_ADDRESS			0x0060			/* pin 23 base address				*/
#define PIN_24_ADDRESS			0x0070			/* pin 24 base address				*/
#define PIN_25_ADDRESS			0x00C0			/* pin 25 base address				*/
#define PIN_26_ADDRESS			0x00D0			/* pin 26 base address				*/
#define PIN_27_ADDRESS			0x00E0			/* pin 27 base address				*/
#define PIN_28_ADDRESS			0x00F0			/* pin 28 base address				*/
#define PIN_29_ADDRESS			0x0140			/* pin 29 base address				*/
#define PIN_30_ADDRESS			0x0150			/* pin 30 base address				*/
#define PIN_31_ADDRESS			0x0160			/* pin 31 base address				*/
#define PIN_32_ADDRESS			0x0170			/* pin 32 base address				*/
#define PIN_33_ADDRESS			0x01C0			/* pin 33 base address				*/
#define PIN_34_ADDRESS			0x01D0			/* pin 34 base address				*/
#define PIN_35_ADDRESS			0x01E0			/* pin 35 base address				*/
#define PIN_36_ADDRESS			0x01F0			/* pin 36 base address				*/
#define PIN_37_ADDRESS			0x0240			/* pin 37 base address				*/
#define PIN_38_ADDRESS			0x0250			/* pin 38 base address				*/
#define PIN_39_ADDRESS			0x0260			/* pin 39 base address				*/
#define PIN_40_ADDRESS			0x0270			/* pin 40 base address				*/

#define PIN_41_ADDRESS			0x0680			/* pin 41 base address				 */
#define PIN_42_ADDRESS			0x0690			/* pin 42 base address				 */
#define PIN_43_ADDRESS			0x06A0			/* pin 43 base address				 */
#define PIN_44_ADDRESS			0x06B0			/* pin 44 base address				 */
#define PIN_45_ADDRESS			0x0600			/* pin 45 base address				 */
#define PIN_46_ADDRESS			0x0610			/* pin 46 base address				*/
#define PIN_47_ADDRESS			0x0620			/* pin 47 base address				*/
#define PIN_48_ADDRESS			0x0630			/* pin 48 base address				*/
#define PIN_49_ADDRESS			0x0580			/* pin 49 base address				*/
#define PIN_50_ADDRESS			0x0590			/* pin 50 base address				*/
#define PIN_51_ADDRESS			0x05A0			/* pin 51 base address				*/
#define PIN_52_ADDRESS			0x05B0			/* pin 52 base address				*/
#define PIN_53_ADDRESS			0x0500			/* pin 53 base address				*/
#define PIN_54_ADDRESS			0x0510			/* pin 54 base address				*/
#define PIN_55_ADDRESS			0x0520			/* pin 55 base address				*/
#define PIN_56_ADDRESS			0x0530			/* pin 56 base address				*/
#define PIN_57_ADDRESS			0x0480			/* pin 57 base address				*/
#define PIN_58_ADDRESS			0x0490			/* pin 58 base address				*/
#define PIN_59_ADDRESS			0x04A0			/* pin 59 base address				*/
#define PIN_60_ADDRESS			0x04B0			/* pin 60 base address				*/
#define PIN_61_ADDRESS			0x0400			/* pin 61 base address				*/
#define PIN_62_ADDRESS			0x0410			/* pin 62 base address				*/
#define PIN_63_ADDRESS			0x0420			/* pin 63 base address				*/
#define PIN_64_ADDRESS			0x0430			/* pin 64 base address				*/
#define PIN_65_ADDRESS			0x0440			/* pin 65 base address				*/
#define PIN_66_ADDRESS			0x0450			/* pin 66 base address				*/
#define PIN_67_ADDRESS			0x0460			/* pin 67 base address				*/
#define PIN_68_ADDRESS			0x0470			/* pin 68 base address				*/
#define PIN_69_ADDRESS			0x04C0			/* pin 69 base address				*/
#define PIN_70_ADDRESS			0x04D0			/* pin 70 base address				*/
#define PIN_71_ADDRESS			0x04E0			/* pin 71 base address				*/
#define PIN_72_ADDRESS			0x04F0			/* pin 72 base address				*/
#define PIN_73_ADDRESS			0x0540			/* pin 73 base address				*/
#define PIN_74_ADDRESS			0x0550			/* pin 74 base address				*/
#define PIN_75_ADDRESS			0x0560			/* pin 75 base address				*/
#define PIN_76_ADDRESS			0x0570			/* pin 76 base address				*/
#define PIN_77_ADDRESS			0x05C0			/* pin 77 base address				*/
#define PIN_78_ADDRESS			0x05D0			/* pin 78 base address				*/
#define PIN_79_ADDRESS			0x05E0			/* pin 79 base address				*/
#define PIN_80_ADDRESS			0x05F0			/* pin 80 base address				*/
#define PIN_81_ADDRESS			0x0640			/* pin 81 base address				 */
#define PIN_82_ADDRESS			0x0650			/* pin 82 base address				 */
#define PIN_83_ADDRESS			0x0660			/* pin 83 base address				 */
#define PIN_84_ADDRESS			0x0670			/* pin 84 base address				 */
#define PIN_85_ADDRESS			0x06C0			/* pin 85 base address				 */
#define PIN_86_ADDRESS			0x06D0			/* pin 86 base address				*/
#define PIN_87_ADDRESS			0x06E0			/* pin 87 base address				*/
#define PIN_88_ADDRESS			0x06F0			/* pin 88 base address				*/

