/* configure whether next DMA EOT is DMA last transfer or not  */
void i2c_dma_last_transfer_config(uint32_t i2c_periph, uint32_t dmalast)
/* configure whether next DMA EOT is DMA last transfer or not  */
void i2c_dma_last_transfer_config(uint32_t i2c_periph, uint32_t dmalast)
{
    uint32_t ctl = 0U;
    ctl = I2C_CTL1(i2c_periph);
    ctl &= ~(I2C_CTL1_DMALST);
    ctl |= dmalast;
    I2C_CTL1(i2c_periph) = ctl;
}