?? discon.c
字號:
#include <EZUSB.H>
#include <EZRegs.h>
#include <Fx.h>
void EZUSB_Discon(BOOL renum)
{
USBCS |=bmDISCON; // added for FX first silicon keeper problem
WRITEDELAY(); // allow for register write recovery time
USBCS &=~bmDISCOE; // Tristate the disconnect pin
WRITEDELAY(); // allow for register write recovery time
USBCS |=bmDISCON; // Set this high to disconnect USB
if(renum) // If renumerate
USBCS |=bmRENUM; // then set renumerate bit
EZUSB_Delay(1500); // Wait 1500 ms (SHK -- If you don't wait this long, some hubs and hosts will not see the disconnect.)
if (CPUCS & CPUCS_48MHZ)
EZUSB_Delay(1500); // Wait 1500 ms (SHK -- If you don't wait this long, some hubs and hosts will not see the disconnect.)
USBIRQ = 0xff; // Clear any pending USB interrupt requests. They're for our old life.
IN07IRQ = 0xff; // clear old activity
OUT07IRQ = 0xff;
EZUSB_IRQ_CLEAR();
USBCS &=~bmDISCON; // reconnect USB
WRITEDELAY(); // allow for register write recovery time
USBCS |=bmDISCOE; // Release Tristated disconnect pin
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -