/* defines */
/* MAX 1617 temperature range definitions */
#define MAX1617_TEMP_MIN	(-55)
#define MAX1617_TEMP_MAX	127

/* MAX1617 address definitions */
#define MAX1617_ADDR_START	0x18		/* first specified MAX1617 address */
#define MAX1617_ADDR_END	0x4e		/* last  specified MAX1617 address */
#define	MAX1617_ADDR1		0x18	/* address of 1st MAX1617 on PEP boards */
		
/* MAX1617 channel definitions */
#define MAX1617_LOCAL		0		/* select MAX1617 local channel */
#define MAX1617_REMOTE		1		/* select MAX1617 remote channel */	

/* MAX1617 threshold definitions */
#define MAX1617_LOW			0		/* select low threshold */
#define MAX1617_HIGH		1		/* select high threshold */

/* MAX1617 register definitions */
#define	MAX1617_RLTS		0x00	/* read local temperature */
#define	MAX1617_RRTS		0x01	/* read remote temperature */
#define	MAX1617_RSTS		0x02	/* read status byte */
#define	MAX1617_RCFG		0x03	/* read configuration byte */
#define	MAX1617_RCVR		0x04	/* read conversion rate */
#define	MAX1617_RLHL		0x05	/* read local T high limit */
#define	MAX1617_RLLL		0x06	/* read local T low limit */
#define	MAX1617_RRHL		0x07	/* read remote T high limit */
#define	MAX1617_RRLL		0x08	/* read remote T low limit */
#define	MAX1617_WCFG		0x09	/* write configuration byte */
#define	MAX1617_WCVR		0x0a	/* write conversion rate byte */
#define	MAX1617_WLHL		0x0b	/* write local T high limit */
#define	MAX1617_WLLL		0x0c	/* write local T low limit */
#define	MAX1617_WRHL		0x0d	/* write remote T high limit */
#define	MAX1617_WRLL		0x0e	/* write remote T low limit */
#define	MAX1617_OSHT		0x0f	/* one-shot command */

/* MAX1617 status bit definitions */
#define	MAX1617_RSTS_BUSY	(1<<7)	/* indicates that ADC is converting */
#define	MAX1617_RSTS_LHIGH	(1<<6)	/* indicates local high temperature alarm */
#define	MAX1617_RSTS_LLOW	(1<<5)	/* indicates local low temperature alarm */
#define	MAX1617_RSTS_RHIGH	(1<<4)	/* indicates remote high temperature alarm */
#define	MAX1617_RSTS_RLOW	(1<<3)	/* indicates remote low temperature alarm */
#define	MAX1617_RSTS_OPEN	(1<<2)	/* indicates remote diode open-circuit fault */

/* MAX 1617 configuration bit definitions */
/* These bits are also valid for MAX1617_RCFG */
#define	MAX1617_WCFG_MASK	(1<<7)	/* mask all alert interrupts */
#define	MAX1617_WCFG_STOP	(1<<6)	/* run / stop command */
