def _send_packet(self):
        cmd = self._crnt_cmd
        if cmd.get_empty():
            return

        max_packets = self._interface.getPacketCount()
        if len(self._commands_to_read) >= max_packets:
            self._read_packet()
        data = cmd.encode_data()
        try:
            self._interface.write(list(data))
        except Exception as exception:
            self._abort_all_transfers(exception)
            raise
        self._commands_to_read.append(cmd)
        self._crnt_cmd = _Command(self._packet_size)
Send a single packet to the interface
dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/DAPAccessUSB._send_packet