⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 temp.c

📁 vxWorks下pc1394的驱动程序
💻 C
字号:

/******************************************************************************
TITLE:  	pc1394DevSetAsyncRespReceiveCmdPtr
DESC:   	routine to set Async response receive command pointer register of PC 1394 card
PARAM:  	ulDescAdrs   - address of descriptor
         ulBlkNum     - number of continious block
RETURN: 	OK    - operation runs successfully
         ERROR - operation runs failed 
******************************************************************************/
STATUS pc1394DevSetAsyncRespReceiveCmdPtr(unsigned long ulDescAdrs, unsigned long ulBlkNum)
{
   unsigned long ulTempData;

   ulTempData = (ulDescAdrs & 0xfffffff0) | (ulBlkNum & 0x0000000f);

   pciWriteLong((int)pPc1394Dev.pciControllerSpace0 + ASY_RES_R_COMMANDPTR_ADR, ulTempData);

   return(OK);
}

/******************************************************************************
TITLE:  	pc1394DevGetAsyncRespReceiveCmdPtr
DESC:   	routine to get Async response receive command pointer register of PC 1394 card
PARAM:  	none
RETURN: 	OK    - operation runs successfully
         ERROR - operation runs failed 
******************************************************************************/
unsigned long pc1394DevGetAsyncRespReceiveCmdPtr(void)
{
   unsigned long ulTempData;

   ulTempData = pciReadLong((int)pPc1394Dev.pciControllerSpace0 + ASY_RES_R_COMMANDPTR_ADR);

   return(ulTempData);
}

/******************************************************************************
TITLE:  	pc1394DevSetAsyncRespReceiveCtxCtl
DESC:   	routine to set Async response receive context control register of PC 1394 card
PARAM:  	ulRegData      - data to write to register
RETURN: 	OK    - operation runs successfully
         ERROR - operation runs failed 
******************************************************************************/
STATUS pc1394DevSetAsyncRespReceiveCtxCtl(unsigned long ulRegData)
{
   unsigned long ulTempData;

   ulTempData = ulRegData;

   pciWriteLong((int)pPc1394Dev.pciControllerSpace0 + ASY_RES_R_CNTXT_CTR_SET_ADR, ulTempData);

   return(OK);
}

/******************************************************************************
TITLE:  	pc1394DevClrAsyncRespReceiveCtxCtl
DESC:   	routine to clear Async response receive context control register of PC 1394 card
PARAM:  	ulRegData      - data to write to register
RETURN: 	OK    - operation runs successfully
         ERROR - operation runs failed 
******************************************************************************/
STATUS pc1394DevClrAsyncRespReceiveCtxCtl(unsigned long ulRegData)
{
   unsigned long ulTempData;

   ulTempData = ulRegData;

   pciWriteLong((int)pPc1394Dev.pciControllerSpace0 + ASY_RES_R_CNTXT_CTR_CLR_ADR, ulTempData);

   return(OK);
}

/******************************************************************************
TITLE:  	pc1394DevGetAsyncRespReceiveCtxCtl
DESC:   	routine to get Async response receive command pointer register of PC 1394 card
PARAM:  	none
RETURN: 	OK    - operation runs successfully
         ERROR - operation runs failed 
******************************************************************************/
unsigned long pc1394DevGetAsyncRespReceiveCtxCtl(void)
{
   unsigned long ulTempData;

   ulTempData = pciReadLong((int)pPc1394Dev.pciControllerSpace0 + ASY_RES_R_CNTXT_CTR_SET_ADR);

   return(ulTempData);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -