BALTECH SDK wrapper functions reference
pico.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_SDK_CMDS_PICO_H__
11 #define __BRP_BALTECH_SDK_CMDS_PICO_H__
12 #include "../typedefs.h"
13 #ifdef BALTECH_SDK_INTERNAL
14 
17 #define BRP_Pico_ErrNoTag BRP_ERR_STATUS(0x1A00, 0x01)
18 #endif // BALTECH_SDK_INTERNAL
19 #ifdef BALTECH_SDK_INTERNAL
20 
23 #define BRP_Pico_ErrCollision BRP_ERR_STATUS(0x1A00, 0x02)
24 #endif // BALTECH_SDK_INTERNAL
25 #ifdef BALTECH_SDK_INTERNAL
26 
29 #define BRP_Pico_ErrHf BRP_ERR_STATUS(0x1A00, 0x04)
30 #endif // BALTECH_SDK_INTERNAL
31 #ifdef BALTECH_SDK_INTERNAL
32 
35 #define BRP_Pico_ErrFrame BRP_ERR_STATUS(0x1A00, 0x07)
36 #endif // BALTECH_SDK_INTERNAL
37 #ifdef BALTECH_SDK_INTERNAL
38 
41 #define BRP_Pico_ErrCrc BRP_ERR_STATUS(0x1A00, 0x08)
42 #endif // BALTECH_SDK_INTERNAL
43 #ifdef BALTECH_SDK_INTERNAL
44 
47 #define BRP_Pico_ErrCom BRP_ERR_STATUS(0x1A00, 0x10)
48 #endif // BALTECH_SDK_INTERNAL
49 #ifdef BALTECH_SDK_INTERNAL
50 
53 #define BRP_Pico_ErrCardNotSupported BRP_ERR_STATUS(0x1A00, 0x22)
54 #endif // BALTECH_SDK_INTERNAL
55 #ifdef BALTECH_SDK_INTERNAL
56 
59 #define BRP_Pico_ErrHwNotSupported BRP_ERR_STATUS(0x1A00, 0x23)
60 #endif // BALTECH_SDK_INTERNAL
61 #ifdef BALTECH_SDK_INTERNAL
62 typedef struct {
63  brp_protocol protocol;
64  unsigned HfMode;
65 } brp_Pico_SetHfMode_t;
73 #ifdef BRP_SUPPORT_LEGACY_METHODS
74 brp_errcode brp_Pico_SetHfMode(brp_protocol protocol, unsigned _input_HfMode);
75 #else
76 brp_errcode brp_Pico_SetHfMode(brp_Pico_SetHfMode_t params);
77 #endif
78 typedef struct {
79  brp_protocol protocol;
80  brp_buf* ASNB;
81  size_t* ASNB_len;
82  brp_mempool *mempool;
83 } brp_Pico_RequestAnticoll_t;
93 #ifdef BRP_SUPPORT_LEGACY_METHODS
94 brp_errcode brp_Pico_RequestAnticoll(brp_protocol protocol, brp_buf* ASNB, size_t* ASNB_len, brp_mempool *mempool);
95 #else
96 brp_errcode brp_Pico_RequestAnticoll(brp_Pico_RequestAnticoll_t params);
97 #endif
98 typedef struct {
99  brp_protocol protocol;
100  brp_buf ASNB;
101  size_t ASNB_len;
102  brp_buf* Serial;
103  size_t* Serial_len;
104  brp_mempool *mempool;
105 } brp_Pico_Select_t;
117 #ifdef BRP_SUPPORT_LEGACY_METHODS
118 brp_errcode brp_Pico_Select(brp_protocol protocol, brp_buf _input_ASNB, size_t _input_ASNB_len, brp_buf* Serial, size_t* Serial_len, brp_mempool *mempool);
119 #else
120 brp_errcode brp_Pico_Select(brp_Pico_Select_t params);
121 #endif
122 typedef struct {
123  brp_protocol protocol;
124 } brp_Pico_Halt_t;
131 #ifdef BRP_SUPPORT_LEGACY_METHODS
132 brp_errcode brp_Pico_Halt(brp_protocol protocol);
133 #else
134 brp_errcode brp_Pico_Halt(brp_Pico_Halt_t params);
135 #endif
136 typedef struct {
137  brp_protocol protocol;
138  unsigned Book;
139  unsigned Page;
140  brp_buf* Page1;
141  size_t* Page1_len;
142  brp_mempool *mempool;
143 } brp_Pico_SelectBookPage_t;
155 #ifdef BRP_SUPPORT_LEGACY_METHODS
156 brp_errcode brp_Pico_SelectBookPage(brp_protocol protocol, unsigned _input_Book, unsigned _input_Page, brp_buf* Page1, size_t* Page1_len, brp_mempool *mempool);
157 #else
158 brp_errcode brp_Pico_SelectBookPage(brp_Pico_SelectBookPage_t params);
159 #endif
160 typedef struct {
161  brp_protocol protocol;
162  bool IsDebitKey;
163  unsigned KeyIdx;
164 } brp_Pico_Authenticate_t;
173 #ifdef BRP_SUPPORT_LEGACY_METHODS
174 brp_errcode brp_Pico_Authenticate(brp_protocol protocol, bool _input_IsDebitKey, unsigned _input_KeyIdx);
175 #else
176 brp_errcode brp_Pico_Authenticate(brp_Pico_Authenticate_t params);
177 #endif
178 typedef struct {
179  brp_protocol protocol;
180  unsigned PageAdr;
181  unsigned PageNr;
182  brp_buf* PageData;
183  size_t* PageData_len;
184  brp_mempool *mempool;
185 } brp_Pico_Read_t;
197 #ifdef BRP_SUPPORT_LEGACY_METHODS
198 brp_errcode brp_Pico_Read(brp_protocol protocol, unsigned _input_PageAdr, unsigned _input_PageNr, brp_buf* PageData, size_t* PageData_len, brp_mempool *mempool);
199 #else
200 brp_errcode brp_Pico_Read(brp_Pico_Read_t params);
201 #endif
202 typedef struct {
203  brp_protocol protocol;
204  unsigned PageAdr;
205  brp_buf PageData;
206  size_t PageData_len;
207 } brp_Pico_Write_t;
217 #ifdef BRP_SUPPORT_LEGACY_METHODS
218 brp_errcode brp_Pico_Write(brp_protocol protocol, unsigned _input_PageAdr, brp_buf _input_PageData, size_t _input_PageData_len);
219 #else
220 brp_errcode brp_Pico_Write(brp_Pico_Write_t params);
221 #endif
222 #endif // BALTECH_SDK_INTERNAL
223 #endif
224 
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
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61