你好,弗兰克,
为了丢弃已经提交给主机的数据,FX2LP必须切换到手动模式。实现下面一段代码来丢弃数据,并重新启用端点缓冲区由外部主机填充。
FiPosit=0x80;/ /激活NAC-ALL以避免竞争条件
同步延迟;
EP6FIFOCFG=0x00;/ /切换到手动模式
同步延迟;
FIFSET=0x06;//复位FIFO 6
同步延迟;
EP6FIFOCFG=0x0C;/ /切换到自动模式
同步延迟;
FiPosit=0x00;/ /释放NACKALL
同步延迟;
最好的问候,
斯里纳斯
以上来自于百度翻译
以下为原文
Hello Frank,
To discard the data that has already been committed to the host, the FX2LP has to be switched to MANUAL mode. Implement the below piece of code to discard the data and re-enable the endpoint buffer to be filled by external master.
FIFORESET = 0x80; // activate NAK-ALL to avoid race conditions
SYNCDELAY;
EP6FIFOCFG = 0x00; //switching to manual mode
SYNCDELAY;
FIFORESET = 0x06; // Reset FIFO 6
SYNCDELAY;
EP6FIFOCFG = 0x0C; //switching to auto mode
SYNCDELAY;
FIFORESET = 0x00; //Release NAKALL
SYNCDELAY;
Best regards,
Srinath S
你好,弗兰克,
为了丢弃已经提交给主机的数据,FX2LP必须切换到手动模式。实现下面一段代码来丢弃数据,并重新启用端点缓冲区由外部主机填充。
FiPosit=0x80;/ /激活NAC-ALL以避免竞争条件
同步延迟;
EP6FIFOCFG=0x00;/ /切换到手动模式
同步延迟;
FIFSET=0x06;//复位FIFO 6
同步延迟;
EP6FIFOCFG=0x0C;/ /切换到自动模式
同步延迟;
FiPosit=0x00;/ /释放NACKALL
同步延迟;
最好的问候,
斯里纳斯
以上来自于百度翻译
以下为原文
Hello Frank,
To discard the data that has already been committed to the host, the FX2LP has to be switched to MANUAL mode. Implement the below piece of code to discard the data and re-enable the endpoint buffer to be filled by external master.
FIFORESET = 0x80; // activate NAK-ALL to avoid race conditions
SYNCDELAY;
EP6FIFOCFG = 0x00; //switching to manual mode
SYNCDELAY;
FIFORESET = 0x06; // Reset FIFO 6
SYNCDELAY;
EP6FIFOCFG = 0x0C; //switching to auto mode
SYNCDELAY;
FIFORESET = 0x00; //Release NAKALL
SYNCDELAY;
Best regards,
Srinath S
举报