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

📄 csl_srioaux.h

📁 Dm6455 driver,magbe useful to you!
💻 H
📖 第 1 页 / 共 4 页
字号:
 *   @n   None
 *
 *
 *   @b Modifies
 *   @n None
 *
 *   @b Example
 *   @verbatim
        CSL_SrioHandle  hSrio;
        CSL_SrioPortData arg;
        ...
        CSL_srioGetSpCtlIndepStat(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */

static inline
void CSL_srioGetSpCtlIndepStat (
    CSL_SrioHandle   hSrio, 
    CSL_SrioPortData *response
)
{
    response->data = hSrio->regs->PORT_OPTION[response->index].SP_CTL_INDEP;
}

/** ============================================================================
 *   @n@b CSL_srioGetPwCapt
 *
 *   @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 write 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_SrioPortWriteCapt arg;
        ...
        CSL_srioGetPwCapt(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */

static inline
void CSL_srioGetPwCapt (
    CSL_SrioHandle        hSrio, 
    CSL_SrioPortWriteCapt *response
)
{
    response->capture0 = hSrio->regs->SP_IP_PW_IN_CAPT[0]; 
    response->capture1 = hSrio->regs->SP_IP_PW_IN_CAPT[1];
    response->capture2 = hSrio->regs->SP_IP_PW_IN_CAPT[2];
    response->capture3 = hSrio->regs->SP_IP_PW_IN_CAPT[3];
}


/** ============================================================================
 *   @n@b CSL_srioErrRateCounterRead
 *
 *   @b Description
 *      Quries the port error rate counter value
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, output parameter 
		             for error rate counter and index to the ports
     @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_srioErrRateCounterRead(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioErrRateCounterRead (
    CSL_SrioHandle  hSrio,
	CSL_SrioPortData *response
)
{
    response->data = 
    CSL_FEXT(hSrio->regs->PORT_ERROR[response->index].SP_ERR_RATE,\
                              SRIO_SP_ERR_RATE_ERROR_RATE_COUNTER); 
}


/** ============================================================================
 *   @n@b CSL_srioErrRatePeakRead
 *
 *   @b Description
 *      Quries the port Error Rate Peak value
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         arg         Pointer to the structure that specify, output parameter for
		              Error Rate Peak value and index
     @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_srioErrRatePeakRead(hSrio, &arg);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioErrRatePeakRead (
    CSL_SrioHandle   hSrio,
	CSL_SrioPortData *response
)
{
    response->data = 
    CSL_FEXT(hSrio->regs->PORT_ERROR[response->index].SP_ERR_RATE, \
                         SRIO_SP_ERR_RATE_PEAK_ERROR_RATE); 
}

/** ============================================================================
 *   @n@b CSL_srioGetGblEnStat
 *
 *   @b Description
 *      Queries the Global enable status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_srioGetGblEnStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetGblEnStat (
	CSL_SrioHandle 	hSrio, 
	Uint32*			response
)
{
	*(Uint32 *)response = hSrio->regs->GBL_EN_STAT;
}

/** ============================================================================
 *   @n@b CSL_srioGetLsuIntrStat
 *
 *   @b Description
 *      Queries the LSU interrupt status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_srioGetLsuIntrStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetLsuIntrStat (
	CSL_SrioHandle 	hSrio, 
	Uint32*			response
)
{
	*(Uint32 *)response = hSrio->regs->LSU_ICSR; 
}

/** ============================================================================
 *   @n@b CSL_srioGetErrRstIntrStat
 *
 *   @b Description
 *      Queries the error and reset interrupt status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_srioGetErrRstIntrStat (hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetErrRstIntrStat (
	CSL_SrioHandle 		hSrio, 
	Uint32*			response
)
{	 
	*(Uint32 *)response = hSrio->regs->ERR_RST_EVNT_ICSR;
}

/** ============================================================================
 *   @n@b CSL_srioGetLsuIntrDecodeStat
 *
 *   @b Description
 *      Queries the LSU interrupt decode status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_srioGetLsuIntrDecodeStat (hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetLsuIntrDecodeStat (
	CSL_SrioHandle		hSrio, 
	Uint32*				response
)
{
	*(Uint32 *)response = CSL_FEXT(hSrio->regs->INTDST_DECODE[0], 
										SRIO_INTDST_DECODE_ISDR31);
}
/** ============================================================================
 *   @n@b CSL_srioGetErrIntrDecodeStat
 *
 *   @b Description
 *      Queries the error interrupt decode status
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_srioGetErrIntrDecodeStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetErrIntrDecodeStat (
	CSL_SrioHandle		hSrio, 
	Uint32*				response
)
{
	*(Uint32 *)response = CSL_FEXT(hSrio->regs->INTDST_DECODE[0], 
										SRIO_INTDST_DECODE_ISDR30);
}

/** ============================================================================
 *   @n@b CSL_srioGetPeFeature
 *
 *   @b Description
 *      Queries the PE features register
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the value
     @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;
        Uint32			resp;
        ...
        CSL_srioGetPeFeature(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetPeFeature (
	CSL_SrioHandle 	hSrio, 
	Uint32*			response
) 
{
	*(Uint32 *)response = hSrio->regs->PE_FEAT;
}

/** ============================================================================
 *   @n@b CSL_srioGetSrcOpernSuppStat
 *
 *   @b Description
 *      Queries the sorce operations supported register
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the value
     @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;
        Uint32			resp;
        ...
        CSL_srioGetSrcOpernSuppStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetSrcOpernSuppStat (
	CSL_SrioHandle		hSrio, 
	Uint32*				response
)
{
	*(Uint32 *)response = hSrio->regs->SRC_OP;
}

/** ============================================================================
 *   @n@b CSL_srioGetDstOpernSuppStat
 *
 *   @b Description
 *      Queries the destination operation support register
 *
 *   @b Arguments
 *   @verbatim
         hSrio       Pointer to the object that holds reference to the 
                     instance of SRIO  

         response    output parameter to return the value
     @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;
        Uint32			resp;
        ...
        CSL_srioGetDstOpernSuppStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_srioGetDstOpernSuppStat (
	CSL_SrioHandle 	hSrio, 
	Uint32*			response
)
{
	*(Uint32 *)response = hSrio->regs->DEST_OP;
}

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

         response    output parameter to return the status
     @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;
        Uint32			resp;
        ...
        CSL_SrioGetLgclTrnsErrStat(hSrio, &resp);
        ...
     @endverbatim
 * ===========================================================================
 */
static inline
void CSL_SrioGetLgclTrnsErrStat (
	CSL_SrioHandle	hSrio, 
	Uint32* 		response
) 
{
	*(Uint32 *)response = hSrio->regs->ERR_DET;
}

#ifdef __cplusplus
extern "C" {
#endif

#endif /* CSL_SRIOAUX_H_ */

⌨️ 快捷键说明

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