From 2ebd9db684112ca14d3edfb1c591ac3f90d91e3b Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 17 Jun 2023 23:45:44 +0200 Subject: Reverse exports --- reader_yhy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'reader_yhy.c') 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 #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() { -- cgit v1.2.3