/* Reads the specified I2C register and returns its value.  */
uint16_t I2C_GetRegister(I2C_Module *I2Cx, uint8_t I2C_Register)
/* Reads the specified I2C register and returns its value.  */
uint16_t I2C_GetRegister(I2C_Module *I2Cx, uint8_t I2C_Register)
{
    __IO uint32_t tmp = 0;
    assert_param(IS_I2C_PERIPH(I2Cx));
    assert_param(IS_I2C_REG(I2C_Register));
    tmp = (uint32_t)I2Cx;
    tmp += I2C_Register;
    return (*(__IO uint16_t*)tmp);
}