/**
*
经过
Control
端口传输数据
* @param *ed
须要进行数据收发的
ED
指针
* @return 0 -
成功
*/
short
ohciCtrlXfer(
AT91S_UHP_ED
*ed)
{
// Programming the CHED
pUhp->
UHP_HcControlHeadED
= (
unsigned
int
) ed;
// Programming the CCED
pUhp->
UHP_HcControlCurrentED
= (
unsigned
int
) ed;
// UHP: UHP is now operational and control list processing is enabled
pUhp->
UHP_HcControl
= 0x90;
// UHP: Notify the Hc that the Control list is filled
pUhp->
UHP_HcCommandStatus
= OHCI_HC_COMMAND_STATUS_CLF;
return
0;
}
|
/**
*
经过
Bulk
端口传输数据
* @param *ed
须要进行数据收发的
ED
指针
* @return 0 -
成功
*/
short
ohciBulkXfer(
AT91S_UHP_ED
*ed)
{
//
禁止
ED
pUhp->
UHP_HcControl
= 0x180;
pUhp->
UHP_HcCommandStatus
= 0x00;
// Programming the BHED
pUhp->
UHP_HcBulkHeadED
= (
unsigned
int
) ed;
// Programming the BCED
pUhp->
UHP_HcBulkCurrentED
= (
unsigned
int
) ed;
// UHP: UHP is now operational and control list processing is enabled
pUhp->
UHP_HcControl
= 0x0A0;
// UHP: Notify the Hc that the Bulk list is filled
pUhp->
UHP_HcCommandStatus
= OHCI_HC_COMMAND_STATUS_BLF;
return
0;
}
|