diff options
author | cbdev <cb@cbcdn.com> | 2023-06-17 23:45:44 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2023-06-17 23:45:44 +0200 |
commit | 2ebd9db684112ca14d3edfb1c591ac3f90d91e3b (patch) | |
tree | 4822920fe69ab887fbf50f757d9596391a158e85 /reader_yhy.c | |
parent | 209897056d43ea0d682700e1078a8988a9b133f3 (diff) | |
download | nfcommander-2ebd9db684112ca14d3edfb1c591ac3f90d91e3b.tar.gz nfcommander-2ebd9db684112ca14d3edfb1c591ac3f90d91e3b.tar.bz2 nfcommander-2ebd9db684112ca14d3edfb1c591ac3f90d91e3b.zip |
Reverse exports
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() { |