/* Reads the specified I2C register and returns its value.  */
uint16_t I2C_ReadRegister(I2C_TypeDef *I2Cx, uint8_t I2C_Register)
/* Reads the specified I2C register and returns its value.  */
uint16_t I2C_ReadRegister(I2C_TypeDef *I2Cx, uint8_t I2C_Register)
{
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  assert_param(IS_I2C_REGISTER(I2C_Register));
  return (*(__IO uint16_t *)(*((__IO uint32_t *)&I2Cx) + I2C_Register));
}