/* Writes an unsigned 8 bit value over I2C.  */
err_t l3gd20Write8(uint8_t reg, uint8_t value)
/* Writes an unsigned 8 bit value over I2C.  */
err_t l3gd20Write8(uint8_t reg, uint8_t value)
{
  I2CWriteLength = 3;
  I2CReadLength = 0;
  I2CMasterBuffer[0] = L3GD20_ADDRESS;
  I2CMasterBuffer[1] = reg;
  I2CMasterBuffer[2] = value;
  ASSERT_I2C_STATUS(i2cEngine());
  return ERROR_NONE;
}