def setSWJPins(self, output, pin, wait=0):
        cmd = []
        cmd.append(COMMAND_ID['DAP_SWJ_PINS'])
        try:
            p = PINS[pin]
        except __HOLE__:
                logging.error('cannot find %s pin', pin)
                return
        cmd.append(output & 0xff)
        cmd.append(p)
        cmd.append(wait & 0xff)
        cmd.append((wait >> 8) & 0xff)
        cmd.append((wait >> 16) & 0xff)
        cmd.append((wait >> 24) & 0xff)
        self.interface.write(cmd)

        resp = self.interface.read()
        if resp[0] != COMMAND_ID['DAP_SWJ_PINS']:
            # Response is to a different command
            raise DAPAccessIntf.DeviceError()

        return resp[1]
dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/cmsis_dap_core.py/CMSIS_DAP_Protocol.setSWJPins