csl_usbhcaux.h
来自「dsp在音频处理中的运用」· C头文件 代码 · 共 842 行 · 第 1/2 页
H
842 行
CSL_FINST(hUsbhc->regs->HCRHSTATUS,USBHC_HCRHSTATUS_OCIC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortEnable(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_SPE,SET);
}
static inline
void
CSL_usbhcPortCtrlPortDisable(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_CPE,SET);
}
static inline
void
CSL_usbhcPortCtrlPortSuspendSet(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_SPS,SET);
}
static inline
void
CSL_usbhcPortCtrlPortSuspendClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_CSS,SET);
}
static inline
void
CSL_usbhcPortCtrlReset(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_SPR,SET);
}
static inline
void
CSL_usbhcPortCtrlPortPowerSet(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_SPP,SET);
}
static inline
void
CSL_usbhcPortCtrlPortPowerClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_CPP,SET);
}
static inline
void
CSL_usbhcPortCtrlConnectStatChgClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_CSC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortEnableStatChgClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_PESC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortSuspendStatChgClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1] ,USBHC_HCRHPORTSTATUS_PSSC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortOvrCurrentIntChgClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_OCIC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortResetStatChgClr(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcDev* cmdArg)
{
CSL_FINST(hUsbhc->regs->HCRHPORTSTATUS[(*(CSL_UsbhcDev*)cmdArg) - 1],USBHC_HCRHPORTSTATUS_PRSC,SET);
}
static inline
void
CSL_usbhcPortCtrlPortCtrl(
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Optional argument @a void* casted */
CSL_UsbhcPortStatCtrl* cmdArg)
{
hUsbhc->regs->HCRHPORTSTATUS[(((CSL_UsbhcPortStatCtrl*)cmdArg)->portNum) - 1] = ((CSL_UsbhcPortStatCtrl*)cmdArg)->statusCtrl;
}
static inline
void
CSL_usbhcQueryRev (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16 * response)
{
*response = CSL_FEXT(hUsbhc->regs->HCREVISION,USBHC_HCREVISION_REV);
}
static inline
void
CSL_usbhcQuerySchedOvrrunCnt (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16 * response)
{
*response = CSL_FEXT(hUsbhc->regs->HCCOMMANDSTATUS,USBHC_HCCOMMANDSTATUS_SOC);
}
static inline
void
CSL_usbhcQueryFrmRemaining (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16* response)
{
*response = CSL_FEXT(hUsbhc->regs->HCFMREMAINING,USBHC_HCFMREMAINING_FR);
}
static inline
void
CSL_usbhcQueryCurrFrmNum (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16* response)
{
*response = CSL_FEXT(hUsbhc->regs->HCFMNUMBER,USBHC_HCFMNUMBER_FN);
}
static inline
void
CSL_usbhcQueryPortNum (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16* response)
{
*response = CSL_FEXT(hUsbhc->regs->HCRHDESCRIPTORA,USBHC_HCRHDESCRIPTORA_NDP);
}
static inline
void
CSL_usbhcQueryRootHubStatus (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
CSL_BitMask32* response)
{
*response = hUsbhc->regs->HCRHSTATUS;
}
static inline
void
CSL_usbhcQueryPortStatus (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
CSL_UsbhcPortStatCtrl* response)
{
response->statusCtrl = hUsbhc->regs->HCRHPORTSTATUS[(response->portNum) - 1];
}
static inline
void
CSL_usbhcQueryUnRecoverErrorAddr (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HOSTUEADDR;
}
static inline
void
CSL_usbhcQueryUnRecoverErrorAccessType (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Bool* response)
{
*response = (Bool)CSL_FEXT(hUsbhc->regs->HOSTUESTATUS,USBHC_HOSTUESTATUS_UEACCESS);
}
static inline
void
CSL_usbhcQuerySoftReset (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Bool* response)
{
if (hUsbhc->regs->HCCONTROL)
*(Bool*)response = TRUE;
else
*(Bool*)response = FALSE;
}
static inline
void
CSL_usbhcQuerySystemReset (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Bool* response)
{
if ((CSL_FEXT(hUsbhc->regs->HCREVISION,USBHC_HCREVISION_REV)==CSL_USBHC_HCREVISION_REV_RESETVAL)&&\
(CSL_FEXT(hUsbhc->regs->HCHCCA,USBHC_HCHCCA_HCCA) == CSL_USBHC_HCHCCA_HCCA_RESETVAL))
*(Bool*)response = TRUE;
else
*(Bool*)response = FALSE;
}
static inline
void
CSL_usbhcQueryHostRev (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint16* response)
{
*(Uint16*)response = CSL_FEXTR(hUsbhc->regs->HOSTREVISION,7,0);
}
static inline
void
CSL_usbhcQueryCurrentedBulk (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HCBULKCURRENTED;
}
static inline
void
CSL_usbhcQueryCurrentedCtrl (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HCCONTROLCURRENTED;
}
static inline
void
CSL_usbhcQueryCurrentedPer (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HCPERIODCURRENTED;
}
static inline
void
CSL_usbhcQueryHeadedBulk (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HCBULKHEADED;
}
static inline
void
CSL_usbhcQueryHeadedCtrl (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*response = hUsbhc->regs->HCCONTROLHEADED;
}
static inline
void
CSL_usbhcQueryHeadDone (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
Uint32* response)
{
*(Uint32*)response = hUsbhc->regs->HDONEHEAD;
}
static inline
void
CSL_usbhcQueryIntrEvents (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
CSL_BitMask32* response)
{
*response = hUsbhc->regs->HCINTERRUPTSTATUS;
}
static inline
void
CSL_usbhcQueryHcFuncState (
/** Pointer to the object that holds reference to the
* instance of USBHC requested after the call */
CSL_UsbhcHandle hUsbhc,
/** Used to return the response */
CSL_UsbhcFuncState* response)
{
*response = (CSL_UsbhcFuncState)CSL_FEXT(hUsbhc->regs->HCCONTROL,USBHC_HCCONTROL_HCFS);
}
#ifdef __cplusplus
}
#endif
#endif /* _CSL_USBHC_AUX_H_ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?