Prepare RFID compilation in firmware mode
[librfid] / include / librfid / rfid.h
1 #ifndef _RFID_H
2 #define _RFID_H
3
4 #include <stdio.h>
5
6 #ifdef __LIBRFID__
7
8 #include <librfid/rfid_system.h>
9
10 enum rfid_frametype {
11         RFID_14443A_FRAME_REGULAR,
12         RFID_14443B_FRAME_REGULAR,
13         RFID_MIFARE_FRAME,
14 };
15
16 //#define DEBUG
17
18 #ifdef DEBUG
19 #define DEBUGP(x, args ...) fprintf(stderr, "%s(%d):%s: " x, __FILE__, __LINE__, __FUNCTION__, ## args)
20 #define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
21 #else
22 #define DEBUGP(x, args ...)
23 #define DEBUGPC(x, args ...)
24 #endif
25
26 extern const char *rfid_hexdump(const void *data, unsigned int len);
27
28 #ifndef ARRAY_SIZE
29 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
30 #endif
31
32 #endif /* __LIBRFID__ */
33
34 int rfid_init();
35
36 enum rfid_opt_level {
37         RFID_LEVEL_ASIC,
38         RFID_LEVEL_READER,
39         RFID_LEVEL_LAYER2,
40         RFID_LEVEL_LAYER3,
41 };
42
43 #endif /* _RFID_H */