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

📄 codapi.h

📁 由visual c++编写的北航一个的指纹识别系统
💻 H
📖 第 1 页 / 共 3 页
字号:
		ACR	CCR	APY	CPY	0	0	0	0
		 |	|	|	 |_________________________________ Check Parity
		 |	|	|__________________________________________ Add Parity
		 |	|__________________________________________________ Check CRC
		 |_________________________________________________________ Add CRC
			  
	bmDiv - specifies the divisor for transmission and reception

		b8							b1
		0	0	0	0	DSI	DSI	DRI	DRI

		For coding of DSI and DRI see ISO14443-4
	
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI set_comm_mode (BYTE bmMode, BYTE bmDiv);
DllExport FWRC set_comm_mode (BYTE bmMode, BYTE bmDiv);

/*++

set_timeout:

	With this command, the timeout value for the next reception can be set.

Arguments:

    bFWI - specifies the FWI value for the timeout calculation
			  
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI set_timeout (BYTE bFWI);
DllExport FWRC set_timeout (BYTE bFWI);

/*++

set_tx_len:

	With this command, the length of the data to be transmitted can be set.

Arguments:

    wLength - specifies the length of the data to be transmitted
			High-Byte: Contains the number of complete bytes to be sent
			Low-Byte: Contains the number of remaining bits to be sent
			  
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI set_tx_len (WORD wLength);
DllExport FWRC set_tx_len (WORD wLength);

/*++

get_rx_len:

	With this command, the length of the received data can be retrieved.

Arguments:

    pwRxLength - specifies the destination of the reception length
			High-Byte: Contains the number of complete bytes to be sent
			Low-Byte: Contains the number of remaining bits to be sent
			  
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI get_rx_len (WORD *pwRxLength);
DllExport FWRC get_rx_len (WORD *pwRxLength);

/*++

send_block:

	Transmits the data submitted. The transmission parameters must be set before.

Arguments:

    SrcPtr - specifies the data to to be sent, first byte specifies the length
			  
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI send_block (MEM_BUFFER *SrcPtr);
DllExport FWRC send_block (MEM_BUFFER *SrcPtr);

/*++

receive_block:

	Transmits the data submitted. The transmission parameters must be set before.

Arguments:

    bEnTimer - Timer disabled if 0, enabled if 1.

	DestPtr - specifies the buffer for the received data,
		    first byte specifies the length
			  
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, DestPtr contains the received data
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI receive_block (BYTE bEnTimer, MEM_BUFFER *DestPtr);
DllExport FWRC receive_block (BYTE bEnTimer, MEM_BUFFER *DestPtr);


/*------------------------------------------------------------------------------
  Group Type A LowLevel:
------------------------------------------------------------------------------*/
/*++
setup_cod_a:

	This function Prepares the ISO-CLL for subsequent communications with a contactless Chipcard
	acc. to ISO 14443 Type A

		
Arguments:

    none
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI setup_cod_a (void);
DllExport FWRC setup_cod_a (void);


/*++

set_type_a_params:

	This function sets the Type A specific parameters.
		
Arguments:

    bGAP - Number of Clk-Periods of ASK100 modulation to form the pause in the
    	communication from PCD to PICC (valid range 28 - 42 acc. to ISO14443-2)

	bVPL - Number of Clk-Periods to form a valid peak (X) and number of peaks
		to form a valid bit (Y) in the communication from PICC to PCD
		b8							b1
		0	X	X	X	X	Y	Y	Y
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
	
--*/
//extern "C" FWRC WINAPI set_type_a_params (BYTE bGAP, BYTE bVPL);
DllExport FWRC set_type_a_params (BYTE bGAP, BYTE bVPL);

/*++
req_a:

	Transmits the REQA command for probing the field for PICCs of Type A and
	returns the received ATQA if available.
		
Arguments:

	pwAtqa - specifies the destination for the ATQA
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_TIMEOUT		No ATQA received
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI req_a (WORD *pwAtqa);
DllExport FWRC req_a (WORD *pwAtqa);


/*++
wakeup_a:

	Transmits the WAKE-UP command to reactivate halted PICCs and returns the
	received ATQA if available.
		
Arguments:

	pwAtqa - specifies the destination for the ATQA
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_TIMEOUT		No ATQA received
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI wakeup_a (WORD *pwAtqa);
DllExport FWRC wakeup_a (WORD *pwAtqa);


/*++
anticoll_a_ll:

	Transmits the Anticollision command as defined in ISO14443-3 based on the cascade
	level specified in cln. The complete UID of this cascade level will be returned in
	UIDPTR. If there is more than one cascadelevel, the first character in UIDPTR will be
	the cascadetag 88h.

		
Arguments:

	bCLn - specifies the cascadelevel to be applied
    pbUID - specifies the destination for the UID of the card
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQA valid
	COD_E_TIMEOUT		No ATQA received
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_BCC		Error in the UID checkbyte
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI anticoll_a_ll (BYTE bCLn, BYTE xdata *pbUID);
DllExport FWRC anticoll_a_ll (BYTE bCLn, BYTE xdata *pbUID);

/*++
anticoll_a:

	Performs the complete Anticollision Loop and retrieves the UID of one PICC.
	The UID will be returned in *UIDPTR, the length in pbUIDlen.

		
Arguments:

	pbUIDlen - specifies the destination for the UID-Length
	pbUID - specifies the destination for the UID of the card
		(must be at least 10 Bytes for the max. UID-Length!)
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATQA valid
	COD_E_TIMEOUT		No ATQA received
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_BCC		Error in the UID checkbyte
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI anticoll_a (BYTE xdata *pbUIDLen, BYTE xdata *pbUID);
DllExport FWRC anticoll_a (BYTE xdata *pbUIDLen, BYTE xdata *pbUID);

/*++
select_a_ll:

	Transmits the Select command as defined in ISO14443-3 based on the cascade
	level specified in CLn. The complete UID of this cascade level must be submitted.
	
Arguments:

	bCLn - specifies the cascadelevel to be applied
    pbUID - specifies the source of the UID of the card
	pbSAK - specifies the destination for the SAK
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, SAK valid
	COD_E_TIMEOUT		No SAK received
	COD_E_CRC		CRC error
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
--*/
//extern "C" FWRC WINAPI select_a_ll (BYTE bCLn, BYTE xdata *pbUID, BYTE data *pbSAK);
DllExport FWRC select_a_ll (BYTE bCLn, BYTE xdata *pbUID, BYTE data *pbSAK);

/*++
select_a:

	Transmits the Select command as defined in ISO14443-3 based on the length of the
	UID and the complete UID itself. The SAK of the final Cascadelevel is returned.
	
Arguments:

	bUIDLen - specifies the length of the UID in pbUID
	pbUID - specifies the source of the UID of the card
	pbSAK - specifies the destination for the SAK
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, SAK valid
	COD_E_TIMEOUT		No SAK received
	COD_E_CRC		CRC error
	COD_E_PARITY		Parity error
	COD_E_BITCOUNT	Wrong Bitcount received
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:
--*/
//extern "C" FWRC WINAPI select_a (BYTE bUIDLen, BYTE xdata *pbUID, BYTE data *pbSAK);
DllExport FWRC select_a (BYTE bUIDLen, BYTE xdata *pbUID, BYTE data *pbSAK);


/*++
halt_a:

	Transmits the HALT command to send all PICCs type A into the HALT state.
	
Arguments:

    none
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, value written
	COD_E_NAK		The request for halt was not accepted
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI halt_a (void);
DllExport FWRC halt_a (void);


/*++
rats_a:

	Transmits the request for ATS as defined in ISO14443-4. The logical ID of the PICC
	is specified in bCID. The response of the PICC, the ATS, is returned in pbAtsPtr.

Arguments:

	bCID - specifies the logical ID of the card
    pbAtsPtr - specifies the destination for the ATS
    
Return Value:

    A FWRC value indicating the status of the requested action.

	Return			Meaning
	======			=======
	COD_S_OK		Successful termination, ATS valid
	COD_E_TIMEOUT		No SAK received
	COD_E_CRC		CRC error
	COD_E_PARITY		Parity error
	COD_E_GENERAL		Error during command execution, command failed
	
Author:

Notes:	
--*/
//extern "C" FWRC WINAPI rats_a (BYTE bCID, BYTE xdata *pbAtsPtr);
DllExport FWRC rats_a (BYTE bCID, BYTE xdata *pbAtsPtr);


/*++
pps_a:

	This command performs the PPS negotiation according to ISO14443-4. The
	logical ID of the PICC must be specified in CID, DSI and DRI are supplied
	in DI in the format (0000 <DSI> <DSI> <DRI> <DRI>)b. 

Arguments:

	bCID - specifies the logical ID of the card
    bDI - specifies the divisor integer acc. to ISO14443-4
    
Return Value:

⌨️ 快捷键说明

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