discon.c
来自「fx2 gpifFIFOREAD方式实现高速数据传输数据固件」· C语言 代码 · 共 21 行
C
21 行
#include <fx2.h>
#include <fx2regs.h>
void EZUSB_Discon(BOOL renum)
{
if(renum) // If renumerate (i.e. 8051 will handle SETUP commands)
USBCS |= (bmDISCON | bmRENUM); // disconnect from USB and set the renumerate bit
else
USBCS |= bmDISCON; // just disconnect from USB
EZUSB_Delay(1500); // Wait 1500 ms
USBIRQ = 0xff; // Clear any pending USB interrupt requests. They're for our old life.
EPIRQ = 0xff;
EZUSB_IRQ_CLEAR();
USBCS &=~bmDISCON; // reconnect USB
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?