From da4aa962e17978a70bf1cf4fc3d1b46b620bc3bf Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 29 Jan 2008 16:29:21 +0000 Subject: * 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 --- utils/librfid-tool.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'utils') 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); -- cgit v1.2.3