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