3 * Start your own mt-rfid pthread.
10 // it might tempt you to run multiple instances with one reader, don't.
11 // running each instance with its own reader (port name) should fine.
13 unsigned reader_type; // 0: auto, 1: 1Mbps, 2,3: slooow
14 char *port_name; // "COM9", "/dev/ttyUSB0", "" for auto selection
15 unsigned port_interface; // 0: auto, 1: serial, 2: ftdi
16 unsigned beep; // beep when a card is beeing read
17 unsigned run; // polling condition
20 // macros for convenience
21 #define READER_TYPE 1 // uFR type (1Mbps)
22 #define PORT_INTERFACE 1 // serial
23 #define PORT_NAME "/dev/ttyUSB0"
25 #define ASYNC_SUFFIX 0
26 #define ASYNC_BAUD_RATE 1000000
27 #define BASYNC_BAUD_RATE B1000000
29 // really simple JSON helpers
30 #define JSON_NUM(NAME) printf("\"" #NAME "\": %d", NAME)
31 #define JSON_STR(NAME) printf("\"" #NAME "\": \"%s\"", NAME)
32 #define JSON_START() printf("{\n")
33 #define JSON_NEXT() printf(",\n")
34 #define JSON_END() printf("\n}\n")