13 #ifndef __BRP_BALTECH_API_CMDS_LG_H__    14 #define __BRP_BALTECH_API_CMDS_LG_H__    15 #include "../typedefs.h"    19 #define BRP_Lg_ErrNomim BRP_ERR_STATUS(0x1100, 0x01)    30 #define BRP_Lg_ErrInvalidCmd BRP_ERR_STATUS(0x1100, 0x02)    38 #define BRP_Lg_ErrAccessDenied BRP_ERR_STATUS(0x1100, 0x03)    45 #define BRP_Lg_ErrHf BRP_ERR_STATUS(0x1100, 0x04)    57 #define BRP_Lg_ErrDataCorrupt BRP_ERR_STATUS(0x1100, 0x05)    64 #define BRP_Lg_ErrCrc BRP_ERR_STATUS(0x1100, 0x06)    72 #define BRP_Lg_ErrCommunication BRP_ERR_STATUS(0x1100, 0x07)    76 #define BRP_Lg_ErrMimCorrupt BRP_ERR_STATUS(0x1100, 0x08)    81 #define BRP_Lg_ErrBusy BRP_ERR_STATUS(0x1100, 0x09)    85 #define BRP_Lg_NotInitialized BRP_ERR_STATUS(0x1100, 0x0A)   158 brp_errcode brp_Lg_Select(
brp_protocol protocol, 
unsigned TO, 
unsigned Adr, 
unsigned Len, 
unsigned PollTime, 
unsigned CRCAdr, 
unsigned SafeDat, 
unsigned ChgSeg, 
unsigned ProtHead, 
unsigned CRCCalc, 
unsigned CRCChk, 
unsigned SegID, 
brp_buf Stamp, 
size_t Stamp_len, 
brp_Lg_Select_MediaType* MediaType, 
unsigned* FuncLevel, 
unsigned* OrgLevel, 
brp_Lg_Select_EvStat* EvStat, 
unsigned* ActSegID, 
unsigned* ActAdr, 
brp_buf* Data, 
size_t* Data_len, 
brp_mempool *mempool);
 brp_Lg_Select_EvStat
Event Status of operation. 
 
brp_errcode brp_Lg_WriteMIM(brp_protocol protocol, unsigned Adr, brp_buf Data, size_t Data_len)
Write data to selected card/segment. 
 
brp_errcode brp_Lg_GenSetDelete(brp_protocol protocol, unsigned GenSetNum, unsigned *DeletedGenSetNum)
Delete stamp data with ID specified in the GenSetNum parameter from the reader's EEPROM. 
 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions. 
 
brp_Lg_SetPassword_PwdStat
Password protection status. 
 
brp_errcode brp_Lg_ReadMIM(brp_protocol protocol, unsigned Adr, unsigned Len, unsigned *DataAdr, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
Read Len Bytes from the currently selected card/segment, starting at address Adr. ...
 
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol. 
 
brp_errcode brp_Lg_WriteMIMCRC(brp_protocol protocol, unsigned Adr, unsigned DataLen, unsigned CRCAdr, brp_buf Data, size_t Data_len)
This command is similar to the brp_Lg_WriteMIM() command, except that a CRC checksum is calculated ov...
 
brp_Lg_Lock_PwdStat
Password protection status. 
 
brp_Lg_Unlock_PwdStat
Password protection status. 
 
brp_errcode brp_Lg_Select(brp_protocol protocol, unsigned TO, unsigned Adr, unsigned Len, unsigned PollTime, unsigned CRCAdr, unsigned SafeDat, unsigned ChgSeg, unsigned ProtHead, unsigned CRCCalc, unsigned CRCChk, unsigned SegID, brp_buf Stamp, size_t Stamp_len, brp_Lg_Select_MediaType *MediaType, unsigned *FuncLevel, unsigned *OrgLevel, brp_Lg_Select_EvStat *EvStat, unsigned *ActSegID, unsigned *ActAdr, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
This command selects a specific segment of a LEGIC Prime card and reads some data from it...
 
struct brp_mempool_object_t * brp_mempool
mempool handle. 
 
brp_errcode brp_Lg_ReadMIMCRC(brp_protocol protocol, unsigned Adr, unsigned Len, unsigned CRCAdr, unsigned *DataAdr, brp_buf *Data, size_t *Data_len, brp_mempool *mempool)
This command is similar to the brp_Lg_ReadMIM() command, except that a CRC checksum is calculated ove...
 
brp_errcode brp_Lg_Idle(brp_protocol protocol, brp_Lg_Idle_PowOff PowOff)
Switch power supply of HF field to the level specified in the PowOff parameter. 
 
brp_Lg_ReadSMStatus_MIMVersion
Size of detected MIM. 
 
brp_errcode brp_Lg_SetPassword(brp_protocol protocol, brp_buf Password, brp_Lg_SetPassword_PwdStat *PwdStat)
Activates password protection for the SC-2560. 
 
brp_Lg_Idle_PowOff
State of the HF field. 
 
brp_errcode brp_Lg_ReadSMStatus(brp_protocol protocol, brp_buf *RFU, unsigned *SWV, unsigned *SmStat, unsigned *HfPow, bool *NoMIM, brp_Lg_ReadSMStatus_MIMVersion *MIMVersion, brp_mempool *mempool)
Retrieve status information from LEGIC prime SM 05 chip as well as information from the currently sel...
 
brp_Lg_GenSetRead_WriteExMode
Determines extended write conditions. 
 
brp_errcode brp_Lg_Lock(brp_protocol protocol, brp_Lg_Lock_PwdStat *PwdStat)
Locks the SC-2560. 
 
unsigned char * brp_buf
represents a pointer to a protocol data buffer. 
 
brp_errcode brp_Lg_Unlock(brp_protocol protocol, brp_buf Password, brp_Lg_Unlock_PwdStat *PwdStat)
Unlocks the SC-2560 with a password. 
 
brp_errcode brp_Lg_GenSetRead(brp_protocol protocol, unsigned DesiredGenSetNum, unsigned *GenSetNum, brp_buf *Stamp, unsigned *StampLen, unsigned *WriteExLen, bool *WriteExShad, brp_Lg_GenSetRead_WriteExMode *WriteExMode, unsigned *WriteExStart, brp_mempool *mempool)
Read stamp data with ID specified in the GenSetNum parameter from the reader's EEPROM. 
 
brp_errcode brp_Lg_MakeMIMCRC(brp_protocol protocol, unsigned Adr, unsigned Len, unsigned CRCAdr)
Create CRC checksum at CRCAdr for a data block of length Len present at address Adr. 
 
brp_Lg_Select_MediaType
Indicates the type of card that was selected.