/* Check interrupt flag of ERROR and update transaction runtime information.  */
static int32_t _spi_err_check(const uint32_t iflag, void *const hw)
/* Check interrupt flag of ERROR and update transaction runtime information.  */
static int32_t _spi_err_check(const uint32_t iflag, void *const hw)
{
	if (SERCOM_SPI_INTFLAG_ERROR & iflag) {
		hri_sercomspi_clear_STATUS_reg(hw, ~0);
		hri_sercomspi_clear_INTFLAG_reg(hw, SERCOM_SPI_INTFLAG_ERROR);
		return ERR_OVERFLOW;
	}
	return ERR_NONE;
}