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 _input_TagType, brp_Hitag_Request_Mode _input_Mode, unsigned* Snr);
103 #else
104 brp_errcode brp_Hitag_Request(brp_Hitag_Request_t params);
105 #endif
106 typedef struct {
107  brp_protocol protocol;
108  brp_Hitag_Select_SelMode SelMode;
109  unsigned Pwd;
110  unsigned* Page1;
111 } brp_Hitag_Select_t;
121 #ifdef BRP_SUPPORT_LEGACY_METHODS
122 brp_errcode brp_Hitag_Select(brp_protocol protocol, brp_Hitag_Select_SelMode _input_SelMode, unsigned _input_Pwd, unsigned* Page1);
123 #else
124 brp_errcode brp_Hitag_Select(brp_Hitag_Select_t params);
125 #endif
126 typedef struct {
127  brp_protocol protocol;
128 } brp_Hitag_Halt_t;
135 #ifdef BRP_SUPPORT_LEGACY_METHODS
136 brp_errcode brp_Hitag_Halt(brp_protocol protocol);
137 #else
138 brp_errcode brp_Hitag_Halt(brp_Hitag_Halt_t params);
139 #endif
140 typedef struct {
141  brp_protocol protocol;
142  unsigned Address;
143  bool InvRead;
144  bool KeyB;
145  bool Encrypt;
146  bool BlockRead;
147  unsigned** PageNr;
148  size_t* PageNr_len;
149  brp_mempool *mempool;
150 } brp_Hitag_Read_t;
165 #ifdef BRP_SUPPORT_LEGACY_METHODS
166 brp_errcode brp_Hitag_Read(brp_protocol protocol, unsigned _input_Address, bool _input_InvRead, bool _input_KeyB, bool _input_Encrypt, bool _input_BlockRead, unsigned** PageNr, size_t* PageNr_len, brp_mempool *mempool);
167 #else
168 brp_errcode brp_Hitag_Read(brp_Hitag_Read_t params);
169 #endif
170 typedef struct {
171  brp_protocol protocol;
172  unsigned Address;
173  bool KeyB;
174  bool Encrypt;
175  bool BlockWrite;
176  unsigned* PageNr;
177  size_t PageNr_len;
178 } brp_Hitag_Write_t;
191 #ifdef BRP_SUPPORT_LEGACY_METHODS
192 brp_errcode brp_Hitag_Write(brp_protocol protocol, unsigned _input_Address, bool _input_KeyB, bool _input_Encrypt, bool _input_BlockWrite, unsigned* _input_PageNr, size_t _input_PageNr_len);
193 #else
194 brp_errcode brp_Hitag_Write(brp_Hitag_Write_t params);
195 #endif
196 typedef struct {
197  brp_protocol protocol;
198  bool Reset;
199  bool HtgS;
200  unsigned* Len;
201  size_t Len_len;
202 } brp_Hitag_PersonaliseHtg_t;
213 #ifdef BRP_SUPPORT_LEGACY_METHODS
214 brp_errcode brp_Hitag_PersonaliseHtg(brp_protocol protocol, bool _input_Reset, bool _input_HtgS, unsigned* _input_Len, size_t _input_Len_len);
215 #else
216 brp_errcode brp_Hitag_PersonaliseHtg(brp_Hitag_PersonaliseHtg_t params);
217 #endif
218 #endif // BALTECH_SDK_INTERNAL
219 #endif
220 
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