16 #ifndef __BRP_BALTECH_API_CMDS_ISO78_H__ 17 #define __BRP_BALTECH_API_CMDS_ISO78_H__ 18 #include "../typedefs.h" 22 #define BRP_Iso78_ErrInvalidSlot BRP_ERR_STATUS(0x4000, 0x02) 26 #define BRP_Iso78_ErrAbort BRP_ERR_STATUS(0x4000, 0x10) 30 #define BRP_Iso78_ErrProtNotSupported BRP_ERR_STATUS(0x4000, 0x20) 34 #define BRP_Iso78_ErrCom BRP_ERR_STATUS(0x4000, 0x21) 38 #define BRP_Iso78_ErrHw BRP_ERR_STATUS(0x4000, 0x22) 42 #define BRP_Iso78_ErrInvalid7816Cmd BRP_ERR_STATUS(0x4000, 0x31) brp_Iso78_OpenSam_LID
Logical SAM-ID (LID)
brp_errcode brp_Iso78_CloseSam(brp_protocol protocol, unsigned SamHandle)
This command closes a communication channel previously opened via the brp_Iso78_OpenSam() command...
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
brp_errcode brp_Iso78_ExchangeApduLegacy(brp_protocol protocol, brp_buf SendData, size_t SendData_len, brp_buf *RecvData, size_t *RecvData_len, brp_mempool *mempool)
This command sends an APDU command on the currently selected and opened SAM.
brp_errcode brp_Iso78_SelectSlot(brp_protocol protocol, unsigned SlotIndex)
This command can be used for readers with more than one SAM slot to switch between the slots...
struct brp_mempool_object_t * brp_mempool
mempool handle.
brp_errcode brp_Iso78_OpenSam(brp_protocol protocol, brp_Iso78_OpenSam_LID LID, unsigned *SamHandle, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
This command sets up a communication channel to a Secure Access Module (SAM) inserted into the reader...
brp_errcode brp_Iso78_ExchangeApdu(brp_protocol protocol, unsigned SamHandle, brp_buf SendData, size_t SendData_len, brp_buf *RecvData, size_t *RecvData_len, brp_mempool *mempool)
This command sends an APDU command on the currently selected and opened SAM module using a logical ID...
brp_errcode brp_Iso78_CloseSamLegacy(brp_protocol protocol)
This command closes a communication channel previously opened via the brp_Iso78_OpenSam() command...
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
brp_errcode brp_Iso78_OpenSamLegacy(brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
This command sets up a communication channel to the SAM in the currently selected slot...