/* param handle WM8904 handle structure. param reg register address. param value value to read. return kStatus_Success, else failed.  */
status_t WM8904_ReadRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t *value)
/* param handle WM8904 handle structure. param reg register address. param value value to read. return kStatus_Success, else failed.  */
status_t WM8904_ReadRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t *value)
{
    assert(handle->config != NULL);
    assert(handle->config->slaveAddress != 0U);
    status_t retval    = 0;
    uint16_t readValue = 0U;
    retval = CODEC_I2C_Receive(handle->i2cHandle, handle->config->slaveAddress, (uint32_t)reg, 1U,
                               (uint8_t *)&readValue, 2U);
    *value = (uint16_t)WM8904_SWAP_UINT16_BYTE_SEQUENCE(readValue);
    return retval;
}