C API for BALTECH SDK
cardemu.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_API_CMDS_CARDEMU_H__
11 #define __BRP_BALTECH_API_CMDS_CARDEMU_H__
12 #include "../typedefs.h"
16 #define BRP_CardEmu_CardemuErrNoTag BRP_ERR_STATUS(0x4700, 0x01)
17 
21 #define BRP_CardEmu_CardemuErrCollision BRP_ERR_STATUS(0x4700, 0x02)
22 
25 #define BRP_CardEmu_CardemuErrHf BRP_ERR_STATUS(0x4700, 0x04)
26 
29 #define BRP_CardEmu_CardemuErrFrame BRP_ERR_STATUS(0x4700, 0x07)
30 
33 #define BRP_CardEmu_CardemuErrCrc BRP_ERR_STATUS(0x4700, 0x08)
34 
37 #define BRP_CardEmu_CardemuErrCom BRP_ERR_STATUS(0x4700, 0x10)
38 
41 #define BRP_CardEmu_CardemuErrBuflen BRP_ERR_STATUS(0x4700, 0x11)
42 
45 #define BRP_CardEmu_CardemuErrTimeout BRP_ERR_STATUS(0x4700, 0x3F)
46 
54 brp_errcode brp_CardEmu_GetMaxFrameSize(brp_protocol protocol, unsigned* MaxFrameSize);
69 brp_errcode brp_CardEmu_StartEmu(brp_protocol protocol, brp_buf Snr, unsigned ATQA, unsigned SAK, unsigned Timeout, brp_buf* FirstCmd, size_t* FirstCmd_len, brp_mempool *mempool);
83 brp_errcode brp_CardEmu_TransparentCmd(brp_protocol protocol, brp_buf Rsp, size_t Rsp_len, unsigned Timeout, brp_buf* Cmd, size_t* Cmd_len, brp_mempool *mempool);
90 brp_errcode brp_CardEmu_GetExternalHfStatus(brp_protocol protocol, unsigned* ExtFieldStat);
104 brp_errcode brp_CardEmu_StartNfc(brp_protocol protocol, bool NfcAPassiv, brp_buf Snr, unsigned ATQA, unsigned SAK, unsigned Timeout, brp_buf* FirstCmd, size_t* FirstCmd_len, brp_mempool *mempool);
105 #endif
106 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
brp_errcode brp_CardEmu_TransparentCmd(brp_protocol protocol, brp_buf Rsp, size_t Rsp_len, unsigned Timeout, brp_buf *Cmd, size_t *Cmd_len, brp_mempool *mempool)
Sends a response to the command returned by brp_CardEmu_StartEmu() or to the command returned by the ...
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_errcode brp_CardEmu_GetExternalHfStatus(brp_protocol protocol, unsigned *ExtFieldStat)
Returns true if an external HF field is detected.
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
brp_errcode brp_CardEmu_GetMaxFrameSize(brp_protocol protocol, unsigned *MaxFrameSize)
This command returns the maximum size of a single ISO14443-3 frame that may be sent/received via brp_...
brp_errcode brp_CardEmu_StartEmu(brp_protocol protocol, brp_buf Snr, unsigned ATQA, unsigned SAK, unsigned Timeout, brp_buf *FirstCmd, size_t *FirstCmd_len, brp_mempool *mempool)
Switch to Passive mode and wait for a ISO1443-3a Request/Anticoll/Select sequence and receive the fir...
brp_errcode brp_CardEmu_StartNfc(brp_protocol protocol, bool NfcAPassiv, brp_buf Snr, unsigned ATQA, unsigned SAK, unsigned Timeout, brp_buf *FirstCmd, size_t *FirstCmd_len, brp_mempool *mempool)
Switch to Passive mode and wait for an NFC powerup sequence.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61