/**
* USB
端口復位
* @param port
須要復位的端口
* @return 0
成功
*/
short
ohciPortReset(
unsigned
char
port)
{
unsigned
int
reg;
// SetPortReset
pUhp->
UHP_HcRhPortStatus
[port] = (1 << 4);
pUhp->
UHP_HcRhPortStatus
[port] = (1 << 20 | 1 << 4);
return
0;
}
|
/**
* USB
端口復位是否結束
* @return 0 –
沒有結束,
>0 –
結束
*/
short
udpIsBusResetOver(
void
)
{
return
pUdp->
UDP_ISR
& AT91C_UDP_ENDBUSRES;
}
|