diff options
Diffstat (limited to 'reader_yhy.c')
-rw-r--r-- | reader_yhy.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/reader_yhy.c b/reader_yhy.c index da5be5e..51ac796 100644 --- a/reader_yhy.c +++ b/reader_yhy.c @@ -1,9 +1,20 @@ #include <stdio.h> #include "nfcommander.h" +#include "config.h" static void __attribute__((constructor)) init() { printf("This is the yhy reader plugin\n"); + + size_t poll_timeout = 1000; + if(config_get("nfc", "interval")){ + poll_timeout = strtoul(config_get("nfc", "interval"), NULL, 10); + } + + char* port = config_get("nfc", "device"); + + printf("Opening %s with polltime %d\n", port, poll_timeout); + } static void __attribute__((destructor)) cleanup() { |