C API for BALTECH SDK
ultralight.h
Go to the documentation of this file.
1 
12 #ifndef __BRP_BALTECH_API_CMDS_ULTRALIGHT_H__
13 #define __BRP_BALTECH_API_CMDS_ULTRALIGHT_H__
14 #include "../typedefs.h"
18 #define BRP_Ultralight_ErrNoTag BRP_ERR_STATUS(0x2500, 0x01)
19 
22 #define BRP_Ultralight_ErrAuth BRP_ERR_STATUS(0x2500, 0x02)
23 
27 #define BRP_Ultralight_ErrHf BRP_ERR_STATUS(0x2500, 0x03)
28 
31 #define BRP_Ultralight_ErrKey BRP_ERR_STATUS(0x2500, 0x04)
32 
36 #define BRP_Ultralight_ErrNack BRP_ERR_STATUS(0x2500, 0x05)
37 
42 #define BRP_Ultralight_ErrInterface BRP_ERR_STATUS(0x2500, 0x18)
43 
46 #define BRP_Ultralight_ErrCmd BRP_ERR_STATUS(0x2500, 0x19)
47 
50 #define BRP_Ultralight_ErrHwNotSupported BRP_ERR_STATUS(0x2500, 0x20)
51 
54 #define BRP_Ultralight_ErrFirmwareNotSupported BRP_ERR_STATUS(0x2500, 0x21)
55 
63 #define BRP_Ultralight_BreakErr BRP_ERR_STATUS(0x2500, 0x28)
64 
75 brp_errcode brp_Ultralight_ExecCmd(brp_protocol protocol, unsigned Cmd, brp_buf Param, size_t Param_len, brp_buf* Response, size_t* Response_len, brp_mempool *mempool);
85 brp_errcode brp_Ultralight_Read(brp_protocol protocol, unsigned PageAdr, brp_buf* PageData, brp_mempool *mempool);
94 brp_errcode brp_Ultralight_Write(brp_protocol protocol, unsigned PageAdr, brp_buf PageData);
110 brp_errcode brp_Ultralight_AuthE2(brp_protocol protocol, brp_Ultralight_AuthE2_DivMode DivMode, bool HasExtIdx, unsigned KeyIdx, brp_buf DivData, size_t DivData_len, unsigned KeyExtIdx);
120 #endif
121 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
brp_errcode brp_Ultralight_Write(brp_protocol protocol, unsigned PageAdr, brp_buf PageData)
Standard write command for Ultralight cards.
brp_Ultralight_AuthE2_DivMode
Specifies diversification algorithm.
Definition: typedefs.h:2379
brp_errcode brp_Ultralight_Read(brp_protocol protocol, unsigned PageAdr, brp_buf *PageData, brp_mempool *mempool)
Standard read command for Ultralight cards.
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
brp_errcode brp_Ultralight_ExecCmd(brp_protocol protocol, unsigned Cmd, brp_buf Param, size_t Param_len, brp_buf *Response, size_t *Response_len, brp_mempool *mempool)
Generic command to communicate to a Mifare Ultralight card.
brp_errcode brp_Ultralight_AuthUser(brp_protocol protocol, brp_Ultralight_AuthUser_CryptoMode CryptoMode, brp_buf Key, size_t Key_len)
Authenticates to an Ultralight-C/EV1 card.
brp_Ultralight_AuthUser_CryptoMode
Sets the encryption algorithm.
Definition: typedefs.h:2401
brp_errcode brp_Ultralight_AuthE2(brp_protocol protocol, brp_Ultralight_AuthE2_DivMode DivMode, bool HasExtIdx, unsigned KeyIdx, brp_buf DivData, size_t DivData_len, unsigned KeyExtIdx)
Authenticates to a Ultralight-c card.
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61