BALTECH SDK wrapper functions reference
hitag.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_SDK_CMDS_HITAG_H__
11 #define __BRP_BALTECH_SDK_CMDS_HITAG_H__
12 #include "../typedefs.h"
13 #ifdef BALTECH_SDK_INTERNAL
14 
17 #define BRP_Hitag_ErrHtgNoTag BRP_ERR_STATUS(0x3000, 0x01)
18 #endif // BALTECH_SDK_INTERNAL
19 #ifdef BALTECH_SDK_INTERNAL
20 
23 #define BRP_Hitag_ErrHtgCollision BRP_ERR_STATUS(0x3000, 0x02)
24 #endif // BALTECH_SDK_INTERNAL
25 #ifdef BALTECH_SDK_INTERNAL
26 
29 #define BRP_Hitag_ErrHtgRxdata BRP_ERR_STATUS(0x3000, 0x03)
30 #endif // BALTECH_SDK_INTERNAL
31 #ifdef BALTECH_SDK_INTERNAL
32 
35 #define BRP_Hitag_HtgChecksum BRP_ERR_STATUS(0x3000, 0x04)
36 #endif // BALTECH_SDK_INTERNAL
37 #ifdef BALTECH_SDK_INTERNAL
38 
41 #define BRP_Hitag_HtgWrongParam BRP_ERR_STATUS(0x3000, 0x07)
42 #endif // BALTECH_SDK_INTERNAL
43 #ifdef BALTECH_SDK_INTERNAL
44 
47 #define BRP_Hitag_ErrHtgAuth BRP_ERR_STATUS(0x3000, 0x09)
48 #endif // BALTECH_SDK_INTERNAL
49 #ifdef BALTECH_SDK_INTERNAL
50 
53 #define BRP_Hitag_ErrHtgOvTo BRP_ERR_STATUS(0x3000, 0x08)
54 #endif // BALTECH_SDK_INTERNAL
55 #ifdef BALTECH_SDK_INTERNAL
56 
59 #define BRP_Hitag_ErrHtgHw BRP_ERR_STATUS(0x3000, 0x0A)
60 #endif // BALTECH_SDK_INTERNAL
61 #ifdef BALTECH_SDK_INTERNAL
62 
65 #define BRP_Hitag_ErrHtgCr BRP_ERR_STATUS(0x3000, 0x0B)
66 #endif // BALTECH_SDK_INTERNAL
67 #ifdef BALTECH_SDK_INTERNAL
68 
71 #define BRP_Hitag_ErrHtgCfg BRP_ERR_STATUS(0x3000, 0x0C)
72 #endif // BALTECH_SDK_INTERNAL
73 #ifdef BALTECH_SDK_INTERNAL
74 
77 #define BRP_Hitag_ErrHtgHfreqctrl BRP_ERR_STATUS(0x3000, 0x0D)
78 #endif // BALTECH_SDK_INTERNAL
79 #ifdef BALTECH_SDK_INTERNAL
80 
83 #define BRP_Hitag_ErrHtgHwNotSupported BRP_ERR_STATUS(0x3000, 0x0F)
84 #endif // BALTECH_SDK_INTERNAL
85 #ifdef BALTECH_SDK_INTERNAL
86 typedef struct {
87  brp_protocol protocol;
88  brp_Hitag_Request_TagType TagType;
89  brp_Hitag_Request_Mode Mode;
90  unsigned* Snr;
91 } brp_Hitag_Request_t;
101 #ifdef BRP_SUPPORT_LEGACY_METHODS
102 brp_errcode brp_Hitag_Request(brp_protocol protocol, brp_Hitag_Request_TagType TagType, brp_Hitag_Request_Mode Mode, unsigned* Snr);
103 #else
104 brp_errcode brp_Hitag_Request(brp_Hitag_Request_t params);
105 #endif
106 #endif // BALTECH_SDK_INTERNAL
107 #ifdef BALTECH_SDK_INTERNAL
108 typedef struct {
109  brp_protocol protocol;
110  brp_Hitag_Select_SelMode SelMode;
111  unsigned Pwd;
112  unsigned* Page1;
113 } brp_Hitag_Select_t;
123 #ifdef BRP_SUPPORT_LEGACY_METHODS
124 brp_errcode brp_Hitag_Select(brp_protocol protocol, brp_Hitag_Select_SelMode SelMode, unsigned Pwd, unsigned* Page1);
125 #else
126 brp_errcode brp_Hitag_Select(brp_Hitag_Select_t params);
127 #endif
128 #endif // BALTECH_SDK_INTERNAL
129 #ifdef BALTECH_SDK_INTERNAL
130 typedef struct {
131  brp_protocol protocol;
132 } brp_Hitag_Halt_t;
139 #ifdef BRP_SUPPORT_LEGACY_METHODS
140 brp_errcode brp_Hitag_Halt(brp_protocol protocol);
141 #else
142 brp_errcode brp_Hitag_Halt(brp_Hitag_Halt_t params);
143 #endif
144 #endif // BALTECH_SDK_INTERNAL
145 #ifdef BALTECH_SDK_INTERNAL
146 typedef struct {
147  brp_protocol protocol;
148  unsigned Address;
149  bool InvRead;
150  bool KeyB;
151  bool Encrypt;
152  bool BlockRead;
153  unsigned** PageNr;
154  size_t* PageNr_len;
155  brp_mempool *mempool;
156 } brp_Hitag_Read_t;
171 #ifdef BRP_SUPPORT_LEGACY_METHODS
172 brp_errcode brp_Hitag_Read(brp_protocol protocol, unsigned Address, bool InvRead, bool KeyB, bool Encrypt, bool BlockRead, unsigned** PageNr, size_t* PageNr_len, brp_mempool *mempool);
173 #else
174 brp_errcode brp_Hitag_Read(brp_Hitag_Read_t params);
175 #endif
176 #endif // BALTECH_SDK_INTERNAL
177 #ifdef BALTECH_SDK_INTERNAL
178 typedef struct {
179  brp_protocol protocol;
180  unsigned Address;
181  bool KeyB;
182  bool Encrypt;
183  bool BlockWrite;
184  unsigned* PageNr;
185  size_t PageNr_len;
186 } brp_Hitag_Write_t;
199 #ifdef BRP_SUPPORT_LEGACY_METHODS
200 brp_errcode brp_Hitag_Write(brp_protocol protocol, unsigned Address, bool KeyB, bool Encrypt, bool BlockWrite, unsigned* PageNr, size_t PageNr_len);
201 #else
202 brp_errcode brp_Hitag_Write(brp_Hitag_Write_t params);
203 #endif
204 #endif // BALTECH_SDK_INTERNAL
205 #ifdef BALTECH_SDK_INTERNAL
206 typedef struct {
207  brp_protocol protocol;
208  bool Reset;
209  bool HtgS;
210  unsigned* Len;
211  size_t Len_len;
212 } brp_Hitag_PersonaliseHtg_t;
223 #ifdef BRP_SUPPORT_LEGACY_METHODS
224 brp_errcode brp_Hitag_PersonaliseHtg(brp_protocol protocol, bool Reset, bool HtgS, unsigned* Len, size_t Len_len);
225 #else
226 brp_errcode brp_Hitag_PersonaliseHtg(brp_Hitag_PersonaliseHtg_t params);
227 #endif
228 #endif // BALTECH_SDK_INTERNAL
229 #endif
230 
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