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
24 #define PORT_NAME "/dev/ttyUSB0"
27 // poll the uFR reader and print JSON formatted card info to stdout.
28 // run it directly or using pthreads.
29 void *mt_rfid_run(void *ptr);
35 mt_rfid_t ufr = {READER_TYPE, PORT_NAME, PORT_INTERFACE, 0, 1};
37 if (!pthread_create(&t, NULL, mt_rfid_run, (void *)&ufr)) {
40 pthread_join(t, NULL);