打印

C6748 USB_dev_msc的问题请教

[复制链接]
1014|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
DSP_推粪球|  楼主 | 2016-3-9 17:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
USB, ev, MSC, TE, ST
大神们:
下面是USB_dev_msc主函数的主循环, 我真的没看出来他是怎么调用读写函数进行USB读写的,还是说他就是等着用户自己在“// If there is no activity then return to the idle state.”处填写读写动作呢??
    while(1)
    {
        switch(g_eMSCState)
        {
            case MSC_DEV_READ:
            {
                //
                // Update the screen if necessary.
                //
                if(g_ulFlags & FLAG_UPDATE_STATUS)
                {
                    UpdateStatus("Reading", 0);
                    g_ulFlags &= ~FLAG_UPDATE_STATUS;
                }

                //
                // If there is no activity then return to the idle state.
                //
                if(g_ulIdleTimeout == 0)
                {
                    UpdateStatus("Idle     ", 0);
                    g_eMSCState = MSC_DEV_IDLE;
                }

                break;
            }
            case MSC_DEV_WRITE:
            {
                //
                // Update the screen if necessary.
                //
                if(g_ulFlags & FLAG_UPDATE_STATUS)
                {
                    UpdateStatus("Writing ", 0);
                    g_ulFlags &= ~FLAG_UPDATE_STATUS;
                }

                //
                // If there is no activity then return to the idle state.
                //
                if(g_ulIdleTimeout == 0)
                {
                    UpdateStatus("Idle     ", 0);
                    g_eMSCState = MSC_DEV_IDLE;
                }
                break;
            }
            case MSC_DEV_IDLE:
            default:
            {
                break;
            }
        }

相关帖子

沙发
zhangmangui| | 2016-3-9 22:25 | 只看该作者
没看懂   还是根据工程跟踪或在线调试找原因吧

使用特权

评论回复
板凳
baimiaocun2015| | 2016-3-9 22:50 | 只看该作者
这个需要在县一步步的调试查看的。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

6

主题

20

帖子

0

粉丝