def _decode_transfer_data(self, data):
        assert self.get_empty() is False
        if data[0] != COMMAND_ID['DAP_TRANSFER']:
            raise ValueError('DAP_TRANSFER response error')

        if data[2] != DAP_TRANSFER_OK:
            if data[2] == DAP_TRANSFER_FAULT:
                raise DAPAccessIntf.TransferFaultError()
            elif data[2] == DAP_TRANSFER_WAIT:
                raise DAPAccessIntf.TransferTimeoutError()
            raise DAPAccessIntf.TransferError()

        # Check for count mismatch after checking for DAP_TRANSFER_FAULT
        # This allows TransferFaultError or TransferTimeoutError to get
        # thrown instead of TransferFaultError
        if data[1] != self._read_count + self._write_count:
            raise DAPAccessIntf.TransferError()

        return data[3:3 + 4 * self._read_count]
Terminate currently running blocks
dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/_Command._decode_transfer_data--crossover with--dataset/ETHPy150Open thasso/pyjip/jip/tools.py/Block.terminate