csl_h3agethwstatus.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 81 行

C
81
字号

/** @file csl_h3aGetHwStatus.c
 *
 *    @brief    File for functional layer of CSL API @a CSL_h3aGetHwStatus()
 *
 *  Description
 *    - The @a CSL_h3aGetHwStatus() function definition & it's associated
 *      functions
 *
 *  Modification 1
 *    - Modified on: 10/18/2004
 *    - Reason: created the sources
 *
 *  @date 18th Oct, 2004
 *    @author Sandeep Tiwari.
 */


#include <csl_h3a.h>
#include <csl_h3a_aux.h>

#pragma CODE_SECTION  (CSL_h3aGetHwStatus,".text:csl_section:h3a")


/** @brief Gets the status of the different operations.
 */
CSL_Status CSL_h3aGetHwStatus(
	/** Pointer to the object that holds reference to the
	 *  instance of h3a requested after the call 
	 */
	CSL_H3aHandle             hH3a,
	/** The query to this API which indicates the status 
	 *  to be returned 
	 */
	CSL_H3aHwStatusQuery      query,
	/** Placeholder to return the status. @a void* casted */
	void                       *response
	){
  
	CSL_Status  status=CSL_SOK;
       
	switch(query){

		case CSL_H3A_QUERY_REV_ID:
			((CSL_H3aRevStatus *)response)->peripheralID = CSL_FEXT(hH3a->regs->PID, H3A_PID_TID);
			((CSL_H3aRevStatus *)response)->classID = CSL_FEXT(hH3a->regs->PID, H3A_PID_CID);
		  	((CSL_H3aRevStatus *)response)->revNum = CSL_FEXT(hH3a->regs->PID, H3A_PID_PREV);
			break;

		case CSL_H3A_QUERY_IS_BUSY_AF:
			status = CSL_h3aIsBusyAf(hH3a, (Uint8 *)response);
			break;

		case CSL_H3A_QUERY_IS_BUSY_AEAWB:
			status = CSL_h3aIsBusyAeawb(hH3a, (Uint8 *)response);
			break;

		default:
	    	       status = CSL_ESYS_INVQUERY ;
			break;	   

	}
	return status;
}



	  	


	  	




	  	

	  	
 
	  	

⌨️ 快捷键说明

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