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

📄 csl_srioaux.h

📁 Dm6455 driver,magbe useful to you!
💻 H
📖 第 1 页 / 共 4 页
字号:
        CSL_srioLsuCompCodeStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioLsuCompCodeStat(
    CSL_SrioHandle      hSrio,
    CSL_SrioLsuCompStat *response
)
{
    response->lsuCompCode = (CSL_SrioCompCode)CSL_FEXT(
                                hSrio->regs->LSU[response->portNum].LSU_REG6, 
                                SRIO_LSU_REG6_COMPLETION_CODE);
}

/** ============================================================================
 *   @n@b CSL_srioLsuBsyStat
 *
 *   @b Description
 *      Quries the LSU busy status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioLsuBsyStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioLsuBsyStat (
    CSL_SrioHandle   hSrio,
    CSL_SrioPortData *response
)
{
    response->data = CSL_FEXT(hSrio->regs->LSU[response->index].LSU_REG6, 
                                                        SRIO_LSU_REG6_BSY);
}



/** ============================================================================
 *   @n@b CSL_srioGetDevIdInfo
 *
 *   @b Description
 *      Quries the device identity.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, device info 

     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioDevInfo arg;
        ...
        CSL_srioGetDevIdInfo(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetDevIdInfo (
    CSL_SrioHandle   hSrio,
    CSL_SrioDevInfo *response
)
{
    response->devId = CSL_FEXT(hSrio->regs->DEV_ID, SRIO_DEV_ID_DEVICEIDENTITY);
    response->devVendorId = CSL_FEXT(hSrio->regs->DEV_ID, 
                                        SRIO_DEV_ID_DEVICE_VENDORIDENTITY);
    response->devRevision = CSL_FEXT(hSrio->regs->DEV_INFO, 
                                        SRIO_DEV_INFO_DEVICEREV);
}



/** ============================================================================
 *   @n@b CSL_srioGetAssyIdInfo
 *
 *   @b Description
 *      Quries the device assembly identity.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, assembly info of
                     the peripheral

     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioAssyInfo arg;
        ...
        CSL_srioGetAssyIdInfo(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetAssyIdInfo (
    CSL_SrioHandle    hSrio,
    CSL_SrioAssyInfo *response
)
{
    response->assyId = CSL_FEXT(hSrio->regs->ASBLY_ID, 
                                      SRIO_ASBLY_ID_ASSY_IDENTITY);
    response->assyVendorId = CSL_FEXT(hSrio->regs->ASBLY_ID, 
                                      SRIO_ASBLY_ID_ASSY_VENDORIDENTITY);
    response->assyRevision = CSL_FEXT(hSrio->regs->ASBLY_INFO, 
                                      SRIO_ASBLY_INFO_ASSYREV);
}
/** ============================================================================
 *   @n@b CSL_srioGetLclCfgBar
 *
 *   @b Description
 *      Quries long address of programmed for the LSU
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify the long address

     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioLongAddress arg;
        ...
        CSL_srioGetLclCfgBar(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetLclCfgBar(
    CSL_SrioHandle      hSrio,
    CSL_SrioLongAddress *response
)
{
    response->addressHi = hSrio->regs->LCL_CFG_HBAR;
    response->addressLo = hSrio->regs->LCL_CFG_BAR;
}

/** ============================================================================
 *   @n@b CSL_srioGetSpLmRespStat
 *
 *   @b Description
 *      Quries the link maintainance response status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpLmRespStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */

static inline
void CSL_srioGetSpLmRespStat (
    CSL_SrioHandle   hSrio,
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT[response->index].SP_LM_RESP;
}
/** ============================================================================
 *   @n@b CSL_srioGetSpAckIdStat
 *
 *   @b Description
 *      Quries port ACK ID status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpAckIdStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetSpAckIdStat (
    CSL_SrioHandle   hSrio,
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT[response->index].SP_ACKID_STAT;
}

/** ============================================================================
 *   @n@b CSL_srioGetSpErrStat
 *
 *   @b Description
 *      Quries the port error status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpErrStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetSpErrStat (
    CSL_SrioHandle   hSrio,
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT[response->index].SP_ERR_STAT;
}

/** ============================================================================
 *   @n@b CSL_srioGetSpCtlStat
 *
 *   @b Description
 *      Quries the port control status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpCtlStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */

static inline
void CSL_srioGetSpCtlStat (
    CSL_SrioHandle   hSrio,
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT[response->index].SP_CTL;
}

/** ============================================================================
 *   @n@b CSL_srioGetLgclTransErrCapt
 *
 *   @b Description
 *      Quries captured error information of 
 *        logical/transport layer status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, captured error
                     information of logical/transport layer
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioLogTrErrInfo arg;
        ...
        CSL_srioGetLgclTransErrCapt(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetLgclTransErrCapt (
    CSL_SrioHandle       hSrio, 
    CSL_SrioLogTrErrInfo *response
)
{
    response->errAddrHi = hSrio->regs->H_ADDR_CAPT;
    response->errAddrLo = CSL_FEXT(hSrio->regs->ADDR_CAPT, 
                                        SRIO_ADDR_CAPT_ADDRESS_31_3); 
    response->xambs = CSL_FEXT(hSrio->regs->ADDR_CAPT, 
                                        SRIO_ADDR_CAPT_XAMSBS);
    response->destId = CSL_FEXTR(hSrio->regs->ID_CAPT, 31, 16);
    response->srcId = CSL_FEXTR(hSrio->regs->ID_CAPT, 15, 0);
    response->ftype = CSL_FEXT(hSrio->regs->CTRL_CAPT, SRIO_CTRL_CAPT_FTYPE); 
    response->tType = CSL_FEXT(hSrio->regs->CTRL_CAPT, SRIO_CTRL_CAPT_TTYPE);
    //response->msgInfo = CSL_FEXT(hSrio->regs->CTRL_CAPT, SRIO_CTRL_CAPT_MSGINFO);
    response->impSpecific = CSL_FEXT(hSrio->regs->CTRL_CAPT, 
                                                SRIO_CTRL_CAPT_IMP_SPECIFIC);
}

/** ============================================================================
 *   @n@b CSL_srioGetSpErrDetStat
 *
 *   @b Description
 *      Quries the port error detect status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpErrDetStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetSpErrDetStat (
    CSL_SrioHandle   hSrio, 
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT_ERROR[response->index].SP_ERR_DET;
}

/** ============================================================================
 *   @n@b CSL_srioGetPortErrCapt
 *
 *   @b Description
 *      Quries the port error capture status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port error capture
                     details
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetPortErrCapt(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetPortErrCapt (
    CSL_SrioHandle      hSrio, 
    CSL_SrioPortErrCapt *response
)
{
    response->portErrCaptType = (CSL_SrioPortCaptType)CSL_FEXT(
            hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_ATTR_CAPT_DBG0, \
                                          SRIO_SP_ERR_ATTR_CAPT_DBG0_INFO_TYPE);  
    response->errorType = CSL_FEXT(
        hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_ATTR_CAPT_DBG0, \
                                           SRIO_SP_ERR_ATTR_CAPT_DBG0_ERROR_TYPE);
    response->impSpecData = CSL_FEXT(
            hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_ATTR_CAPT_DBG0, \
                                        SRIO_SP_ERR_ATTR_CAPT_DBG0_IMP_SPECIFIC);
    response->capture0 = 
        hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_CAPT_DBG[0];
    response->capture1 = 
        hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_CAPT_DBG[1];
    response->capture2 = 
        hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_CAPT_DBG[2];
    response->capture3 = 
        hSrio->regs->PORT_ERROR[response->portNum].SP_ERR_CAPT_DBG[3];
        
}

/** ============================================================================
 *   @n@b CSL_srioGetSpCtlIndepStat
 *
 *   @b Description
 *      Quries the port control independent status.
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, port number and the 
                     argument
     @endverbatim
 *
 *   <b> Return Value </b>
 *       None
 *
 *   <b> Pre Condition </b>
 *   @n  None
 *
 *   <b> Post Condition </b>

⌨️ 快捷键说明

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