C API for BALTECH SDK
vhl.h
Go to the documentation of this file.
1 
18 #ifndef __BRP_BALTECH_API_CMDS_VHL_H__
19 #define __BRP_BALTECH_API_CMDS_VHL_H__
20 #include "../typedefs.h"
31 #define BRP_VHL_ErrNoTag BRP_ERR_STATUS(0x0100, 0x01)
32 
36 #define BRP_VHL_ErrCardNotSelected BRP_ERR_STATUS(0x0100, 0x02)
37 
41 #define BRP_VHL_ErrHf BRP_ERR_STATUS(0x0100, 0x03)
42 
47 #define BRP_VHL_ErrConfig BRP_ERR_STATUS(0x0100, 0x04)
48 
54 #define BRP_VHL_ErrAuth BRP_ERR_STATUS(0x0100, 0x05)
55 
61 #define BRP_VHL_ErrRead BRP_ERR_STATUS(0x0100, 0x06)
62 
68 #define BRP_VHL_ErrWrite BRP_ERR_STATUS(0x0100, 0x07)
69 
74 #define BRP_VHL_ConfcardRead BRP_ERR_STATUS(0x0100, 0x08)
75 
80 #define BRP_VHL_ErrInvalidCardType BRP_ERR_STATUS(0x0100, 0x09)
81 
86 #define BRP_VHL_ErrNotSupported BRP_ERR_STATUS(0x0100, 0x0A)
87 
92 #define BRP_VHL_ErrFormat BRP_ERR_STATUS(0x0100, 0x0B)
93 
97 #define BRP_VHL_ErrHw BRP_ERR_STATUS(0x0100, 0x0C)
98 
145 brp_errcode brp_VHL_Select(brp_protocol protocol, brp_CardFamilies CardFamiliesFilter, bool Reselect, bool AcceptConfCard, brp_CardType* SelectedCardType);
163 brp_errcode brp_VHL_GetSnr(brp_protocol protocol, brp_buf* Snr, size_t* Snr_len, brp_mempool *mempool);
179 brp_errcode brp_VHL_Read(brp_protocol protocol, unsigned Id, unsigned Adr, unsigned Len, brp_buf* Data, size_t* Data_len, brp_mempool *mempool);
193 brp_errcode brp_VHL_Write(brp_protocol protocol, unsigned Id, unsigned Adr, brp_buf Data, size_t Data_len);
238 brp_errcode brp_VHL_GetLegacyATR(brp_protocol protocol, brp_buf* ATR, size_t* ATR_len, brp_mempool *mempool);
274 brp_errcode brp_VHL_ExchangeAPDU(brp_protocol protocol, brp_CardType AssumedCardType, brp_buf Cmd, size_t Cmd_len, brp_buf* Resp, size_t* Resp_len, brp_mempool *mempool);
320 brp_errcode brp_VHL_Setup(brp_protocol protocol, brp_CardType ConsideredCardType, brp_buf MifareKey, bool AsKeyA, unsigned MadId, unsigned AppId, brp_DesfireFileDescription DesfireFileDesc, brp_buf Key, size_t Key_len, brp_buf SegmentInfo, size_t SegmentInfo_len, bool EnStamp, brp_VHL_Setup_AdrMode AdrMode, unsigned FirstBlock, unsigned BlockCount, unsigned FileLen, brp_VHL_Setup_SelectFileCmdList_Entry* SelectFileCmdList, size_t SelectFileCmdList_len);
347 brp_errcode brp_VHL_SetupMifare(brp_protocol protocol, bool CustomKey, bool KeyA, brp_buf Key);
380 brp_errcode brp_VHL_SetupLegic(brp_protocol protocol, unsigned StampLen, unsigned SegmentID, brp_buf Stamp, size_t Stamp_len);
402 brp_errcode brp_VHL_SetupISO15(brp_protocol protocol, unsigned FirstBlock, unsigned BlockCount, bool OptionFlag);
415 brp_errcode brp_VHL_CheckReconfigErr(brp_protocol protocol, bool* Failed);
473 brp_errcode brp_VHL_ExchangeLongAPDU(brp_protocol protocol, brp_CardType AssumedCardType, bool Reset, bool ContinueCmd, brp_buf Cmd, size_t Cmd_len, bool* ContinueResp, brp_buf* Resp, size_t* Resp_len, brp_mempool *mempool);
505 brp_errcode brp_VHL_GetFileInfo(brp_protocol protocol, unsigned Id, unsigned* Len, unsigned* BlockSize);
522 brp_errcode brp_VHL_GetATR(brp_protocol protocol, brp_buf* ATR, size_t* ATR_len, brp_mempool *mempool);
536 brp_errcode brp_VHL_Format(brp_protocol protocol, unsigned Id);
561 brp_errcode brp_VHL_ResolveFilename(brp_protocol protocol, char* FileName, unsigned* Id);
562 #endif
563 
brp_CardType
Definition: typedefs.h:3946
brp_errcode brp_VHL_Setup(brp_protocol protocol, brp_CardType ConsideredCardType, brp_buf MifareKey, bool AsKeyA, unsigned MadId, unsigned AppId, brp_DesfireFileDescription DesfireFileDesc, brp_buf Key, size_t Key_len, brp_buf SegmentInfo, size_t SegmentInfo_len, bool EnStamp, brp_VHL_Setup_AdrMode AdrMode, unsigned FirstBlock, unsigned BlockCount, unsigned FileLen, brp_VHL_Setup_SelectFileCmdList_Entry *SelectFileCmdList, size_t SelectFileCmdList_len)
brp_errcode brp_VHL_GetSnr(brp_protocol protocol, brp_buf *Snr, size_t *Snr_len, brp_mempool *mempool)
brp_errcode brp_VHL_ResolveFilename(brp_protocol protocol, char *FileName, unsigned *Id)
brp_errcode brp_VHL_GetATR(brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
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_VHL_SetupMifare(brp_protocol protocol, bool CustomKey, bool KeyA, brp_buf Key)
brp_errcode brp_VHL_SetupISO15(brp_protocol protocol, unsigned FirstBlock, unsigned BlockCount, bool OptionFlag)
brp_errcode brp_VHL_ExchangeLongAPDU(brp_protocol protocol, brp_CardType AssumedCardType, bool Reset, bool ContinueCmd, brp_buf Cmd, size_t Cmd_len, bool *ContinueResp, brp_buf *Resp, size_t *Resp_len, brp_mempool *mempool)
brp_errcode brp_VHL_GetFileInfo(brp_protocol protocol, unsigned Id, unsigned *Len, unsigned *BlockSize)
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_errcode brp_VHL_ExchangeAPDU(brp_protocol protocol, brp_CardType AssumedCardType, brp_buf Cmd, size_t Cmd_len, brp_buf *Resp, size_t *Resp_len, brp_mempool *mempool)
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
Definition: typedefs.h:2504
brp_VHL_Setup_AdrMode
Definition: typedefs.h:2434
brp_errcode brp_VHL_Select(brp_protocol protocol, brp_CardFamilies CardFamiliesFilter, bool Reselect, bool AcceptConfCard, brp_CardType *SelectedCardType)
brp_errcode brp_VHL_SetupLegic(brp_protocol protocol, unsigned StampLen, unsigned SegmentID, brp_buf Stamp, size_t Stamp_len)
brp_errcode brp_VHL_GetLegacyATR(brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
brp_errcode brp_VHL_Format(brp_protocol protocol, unsigned Id)
brp_errcode brp_VHL_IsSelected(brp_protocol protocol)
brp_errcode brp_VHL_Write(brp_protocol protocol, unsigned Id, unsigned Adr, brp_buf Data, size_t Data_len)
brp_errcode brp_VHL_CheckReconfigErr(brp_protocol protocol, bool *Failed)
brp_errcode brp_VHL_Read(brp_protocol protocol, unsigned Id, unsigned Adr, unsigned Len, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61