/******************************************************************************
I2CLINE Header file

Michael Simmons
Master Project:
Date Created:	25 Oct 2008
Date Modified:	25 Oct 2008

*******************************************************************************

Description:
	The I2CLINE is designed to handle the communication from the gumstix to
	the other devices that are connected to the robostix.

******************************************************************************/

#include "I2cLine.h"

I2cLine::I2cLine()
{
//  i2cFileName = new "/dev/i2c-0";

  if(( i2cHandle = open( "/dev/i2c-0", O_RDWR )) < 0 )
  {
    cout << "Open Failed" << endl;
    exit( 1 );
  }
}

I2cLine *I2cLine::init()
{
  if( m_init == 0 )
    m_init = new I2cLine();
  return m_init;
}

int I2cLine::getHandle()
{
  return i2cHandle;
}

