Skip to content

WinUsb_WritePipe is timeout #24

Description

@sufengfeng

Firstly,Open device successfully,then send package to can device.
if insertting is not correctly, the function of WinUsb_WritePipe has chance of timeout.
企业微信截图_16885395106778

the answ of question is insert the code.

long  timeout = 500;            //设置输出超时时间为500ms
if (!WinUsb_SetPipePolicy(dev->winUSBHandle, dev->bulkOutPipe, PIPE_TRANSFER_TIMEOUT, sizeof(timeout),
                          &timeout)) {
    dev->last_error = CANDLE_ERR_SET_PIPE_TRANSFER_TIMEOUT;
    goto winusb_free;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions