def get_read_space(self):
        # Size left if useing DAP_Transfer
        send, recv = self._dap_transfer_free_bytes(self._size)
        transfer_size = min(send, recv // 4)

        # Size left if using DAP_TransferBlock
        _, recv = self._dap_transfer_block_free_bytes(self._size)
        transfer_block_size = recv // 4

        # If data does not allow block transfer invalidate it
        if not self._block_allowed:
            transfer_block_size = -1

        size = max(transfer_size, transfer_block_size)
        assert size >= 0
        return size
Module's Home Page
dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/_Command.get_read_space--crossover with--dataset/ETHPy150Open sahana/eden/controllers/asset.py/index