#ifndef IOI2C_INC
#define IOI2C_INC			1

#include	<msc_config.h>

//External Vars
extern ushort WrRegVal;
extern ushort WhichRxd;

/* Routines to access LJC BIT-BANGED I2C Interface */

// I2C RETURN CODES
#define I2C_NAK				0
#define I2C_ACK				1
#define I2C_OK				1
#define I2C_ERROR		   -1

// I2C BUS SELECTS
#define I2C_BUS_SYS			1
#define I2C_BUS_DURA		2
#define I2C_BUS_DISABLE		3

// I2C PROTOTYPES
void  I2C_Init(void);
int   I2C_Select(uchar Select);
int   I2C_Start(void);
void  I2C_Stop(void);
int   I2C_WrByte(uchar Data);
int   I2C_RdByte(uchar *Data);
void  I2C_WrAck(void);
void  I2C_WrNak(void);

#endif
