/* Master sends target device address followed by internal memory address for read request.  */
static ald_status_t i2c_master_req_read(ald_i2c_handle_t *hperh, uint16_t dev_addr, uint32_t timeout)
/* Master sends target device address followed by internal memory address for read request.  */
static ald_status_t i2c_master_req_read(ald_i2c_handle_t *hperh, uint16_t dev_addr, uint32_t timeout)
{
    if (hperh->init.addr_mode == ALD_I2C_ADDR_7BIT)
        CLEAR_BIT(hperh->perh->CON2, I2C_CON2_ADD10_MSK);
    else
        SET_BIT(hperh->perh->CON2, I2C_CON2_ADD10_MSK);
    MODIFY_REG(hperh->perh->CON2, I2C_CON2_SADD_MSK, dev_addr << I2C_CON2_SADD_POSS);
    SET_BIT(hperh->perh->CON2, I2C_CON2_RD_WRN_MSK);
    return ALD_OK;
}