
unsigned char i2c_transmit(unsigned char address, unsigned char *transmit_bytes, unsigned char MAX_NUMBYTE_TX[])
{

  //extern unsigned char byte1, byte2;
  // if already busy then return current status
  if (i2cstatus & I2C_BUSY) return i2cstatus;

  // now we are busy performing a transfer
  i2cstatus = I2C_BUSYTX;

  // store slave address + W for use in ISR
  slaveaddress = address << 1;

  // transmit start condition
  STA = 1;

  // transmission started
  return I2C_OK;
}
