/**
* 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;
}
|