美文网首页
记录 timeout 机制防止以后遗忘

记录 timeout 机制防止以后遗忘

作者: zhangsini | 来源:发表于2018-04-27 10:14 被阅读0次

    int nRet = InitLib_FindPSoCDev(); // Re-Init lib and find device

    while(nRet!=0) //if fail reload 10 times

    {

        ncount++;

        if(ncount>10)

        {

            pDlg->LogToFiles(_T("\nReset PSoC timeout error\n"),2);

            Sleep(2000);

            pDlg->EndDialog(0);

            return -1;

            }

        Sleep(1000);

        nRet = InitLib_FindPSoCDev();

    }

    pDlg->LogToFiles(_T("\n        Reset PSoC Success!\n"),2);

    相关文章

      网友评论

          本文标题:记录 timeout 机制防止以后遗忘

          本文链接:https://www.haomeiwen.com/subject/twqblftx.html