summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-01-29 16:29:21 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-01-29 16:29:21 +0000
commitda4aa962e17978a70bf1cf4fc3d1b46b620bc3bf (patch)
treece482cb98a3318224d0fd40f951688cfd6bf1140 /utils
parent2b0914e033eb2644fe576b7b4c03309830abd2ec (diff)
* implement rfid_reader_{get,set}opt()
* move get/set environment and get firmware api version to reader_{get,set}opt() * merge rc632 power_up and power_down functions in new power function * merge rc632 layer 2 protocol init functions into one * rename parameters of rfid_layer2_{get,set}opt() * move rf_power() function of reader to new setopt() interface * merge reader layer 2 protocol init functiosn into one * move most of the iso15693 anticol implementation from asic into layer2 code * make most iso15693 parameters configurable via layer2_{get,set}opt() * implement AFI for iso15693 inventory request * introduce new generic 'rc632 asic based reader' functions * use those functions from openpcd, cm5121 and spidev readers * use new register initialization script data structure for rc632 init functions * TODO update git-svn-id: https://svn.gnumonks.org/trunk/librfid@2064 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'utils')
-rw-r--r--utils/librfid-tool.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/librfid-tool.c b/utils/librfid-tool.c
index 910770f..449cb4c 100644
--- a/utils/librfid-tool.c
+++ b/utils/librfid-tool.c
@@ -334,9 +334,18 @@ static int do_scan(int first)
unsigned int size_len = sizeof(size);
if (first) {
- rh->reader->rf_power(rh, 0);
+ unsigned int opt;
+ unsigned int optlen = sizeof(opt);
+
+ /* turn off RF */
+ opt = 1;
+ rfid_reader_setopt(rh, RFID_OPT_RDR_RF_KILL, &opt, optlen);
+
usleep(10*1000);
- rh->reader->rf_power(rh, 1);
+
+ /* turn on RF */
+ opt = 0;
+ rfid_reader_setopt(rh, RFID_OPT_RDR_RF_KILL, &opt, optlen);
}
printf("scanning for RFID token...\n");
rc = rfid_scan(rh, &l2h, &ph);
personal git repositories of Harald Welte. Your mileage may vary