18.8.3.3.2 Workflow

  1. Start to wait a packet from master.
    dma_start_transfer_job(&i2c_dma_resource);
    
  2. Once data ready, clear the address match status.
    while (true) {
        if (i2c_slave_dma_read_interrupt_status(&i2c_slave_instance) &
                    SERCOM_I2CS_INTFLAG_AMATCH) {
            i2c_slave_dma_write_interrupt_status(&i2c_slave_instance,
                    SERCOM_I2CS_INTFLAG_AMATCH);
        }
    }