C API for BALTECH SDK
vhl.h File Reference
#include "../typedefs.h"

Go to the source code of this file.

Macros

#define BRP_VHL_ErrNoTag   BRP_ERR_STATUS(0x0100, 0x01)
 
#define BRP_VHL_ErrCardNotSelected   BRP_ERR_STATUS(0x0100, 0x02)
 
#define BRP_VHL_ErrHf   BRP_ERR_STATUS(0x0100, 0x03)
 
#define BRP_VHL_ErrConfig   BRP_ERR_STATUS(0x0100, 0x04)
 
#define BRP_VHL_ErrAuth   BRP_ERR_STATUS(0x0100, 0x05)
 
#define BRP_VHL_ErrRead   BRP_ERR_STATUS(0x0100, 0x06)
 
#define BRP_VHL_ErrWrite   BRP_ERR_STATUS(0x0100, 0x07)
 
#define BRP_VHL_ConfcardRead   BRP_ERR_STATUS(0x0100, 0x08)
 
#define BRP_VHL_ErrInvalidCardType   BRP_ERR_STATUS(0x0100, 0x09)
 
#define BRP_VHL_ErrNotSupported   BRP_ERR_STATUS(0x0100, 0x0A)
 
#define BRP_VHL_ErrFormat   BRP_ERR_STATUS(0x0100, 0x0B)
 
#define BRP_VHL_ErrHw   BRP_ERR_STATUS(0x0100, 0x0C)
 
#define BRP_VHL_ErrApdu   BRP_ERR_STATUS(0x0100, 0x0D)
 

Functions

brp_errcode brp_VHL_Select (brp_protocol protocol, brp_CardFamilies CardFamiliesFilter, bool Reselect, bool AcceptConfCard, brp_CardType *SelectedCardType)
 
brp_errcode brp_VHL_GetSnr (brp_protocol protocol, brp_buf *Snr, size_t *Snr_len, brp_mempool *mempool)
 
brp_errcode brp_VHL_Read (brp_protocol protocol, unsigned Id, unsigned Adr, unsigned Len, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
 
brp_errcode brp_VHL_Write (brp_protocol protocol, unsigned Id, unsigned Adr, brp_buf Data, size_t Data_len)
 
brp_errcode brp_VHL_IsSelected (brp_protocol protocol)
 
brp_errcode brp_VHL_GetLegacyATR (brp_protocol protocol, brp_buf *ATR, size_t *ATR_len, brp_mempool *mempool)
 
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)
 
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, brp_VHL_Setup_OptionFlag OptionFlag, unsigned BlockSize, unsigned FileLen, brp_VHL_Setup_SelectFileCmdList_Entry *SelectFileCmdList, size_t SelectFileCmdList_len)
 
brp_errcode brp_VHL_SetupMifare (brp_protocol protocol, bool CustomKey, bool KeyA, brp_buf Key)
 
brp_errcode brp_VHL_SetupLegic (brp_protocol protocol, unsigned StampLen, unsigned SegmentID, brp_buf Stamp, size_t Stamp_len)
 
brp_errcode brp_VHL_SetupISO15 (brp_protocol protocol, unsigned FirstBlock, unsigned BlockCount, bool OptionFlag)
 
brp_errcode brp_VHL_CheckReconfigErr (brp_protocol protocol, bool *Failed)
 
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)
 
brp_errcode brp_VHL_GetATR (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_ResolveFilename (brp_protocol protocol, char *FileName, unsigned *Id)
 

Detailed Description

VHL stands for Very High Level card access. With this command group, you can handle nearly all aspects of the card technology used in your project while avoiding complex low-level command sequences.

You cannot mix VHL and low-level commands.

For more details on how to implement VHL, please see our VHL workflow overview.

Definition in file vhl.h.