/* Transmitting I2C data. Will busy-wait until the transfer is complete.  */
void performI2CTransfer(void)
/* Transmitting I2C data. Will busy-wait until the transfer is complete.  */
void performI2CTransfer(void)
{
  I2C_TransferSeq_TypeDef i2cTransfer;
  i2cTransfer.addr          = CPT112S_I2C_ADDRESS;
  i2cTransfer.flags         = I2C_FLAG_READ;
  i2cTransfer.buf[0].data   = i2c_rxBuffer;
  i2cTransfer.buf[0].len    = CPT112S_I2C_RXBUFFER_SIZE;
  I2C_TransferInit(I2C0, &i2cTransfer);
  while (I2C_Transfer(I2C0) == i2cTransferInProgress);
}