C API for BALTECH SDK
lg.h
Go to the documentation of this file.
1 
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)
20 
30 #define BRP_Lg_ErrInvalidCmd BRP_ERR_STATUS(0x1100, 0x02)
31 
38 #define BRP_Lg_ErrAccessDenied BRP_ERR_STATUS(0x1100, 0x03)
39 
45 #define BRP_Lg_ErrHf BRP_ERR_STATUS(0x1100, 0x04)
46 
57 #define BRP_Lg_ErrDataCorrupt BRP_ERR_STATUS(0x1100, 0x05)
58 
64 #define BRP_Lg_ErrCrc BRP_ERR_STATUS(0x1100, 0x06)
65 
72 #define BRP_Lg_ErrCommunication BRP_ERR_STATUS(0x1100, 0x07)
73 
76 #define BRP_Lg_ErrMimCorrupt BRP_ERR_STATUS(0x1100, 0x08)
77 
81 #define BRP_Lg_ErrBusy BRP_ERR_STATUS(0x1100, 0x09)
82 
85 #define BRP_Lg_NotInitialized BRP_ERR_STATUS(0x1100, 0x0A)
86 
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);
187 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);
197 brp_errcode brp_Lg_GenSetDelete(brp_protocol protocol, unsigned GenSetNum, unsigned* DeletedGenSetNum);
211 brp_errcode brp_Lg_ReadMIM(brp_protocol protocol, unsigned Adr, unsigned Len, unsigned* DataAdr, brp_buf* Data, size_t* Data_len, brp_mempool *mempool);
230 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);
240 brp_errcode brp_Lg_WriteMIM(brp_protocol protocol, unsigned Adr, brp_buf Data, size_t Data_len);
257 brp_errcode brp_Lg_WriteMIMCRC(brp_protocol protocol, unsigned Adr, unsigned DataLen, unsigned CRCAdr, brp_buf Data, size_t Data_len);
270 brp_errcode brp_Lg_MakeMIMCRC(brp_protocol protocol, unsigned Adr, unsigned Len, unsigned CRCAdr);
285 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);
312 #endif
313 
brp_Lg_Select_EvStat
Event Status of operation.
Definition: typedefs.h:1819
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.
Definition: errorcodes.h:23
brp_Lg_SetPassword_PwdStat
Password protection status.
Definition: typedefs.h:1924
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.
Definition: protocol.h:34
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.
Definition: typedefs.h:1942
brp_Lg_Unlock_PwdStat
Password protection status.
Definition: typedefs.h:1956
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.
Definition: mempool.h:27
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.
Definition: typedefs.h:1906
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.
Definition: typedefs.h:1865
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.
Definition: typedefs.h:1884
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.
Definition: common.h:61
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.
Definition: typedefs.h:1789