From b9e8c17d8c4f28938c7cb0a665a1f21232ebdf66 Mon Sep 17 00:00:00 2001 From: laforge Date: Sun, 23 Oct 2005 20:03:56 +0000 Subject: make "frametype" a parameter of transcieve functions git-svn-id: https://svn.gnumonks.org/trunk/librfid@1559 e0336214-984f-0b4b-a45f-81c69e1f0ede --- rfid_layer2_iso14443a.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'rfid_layer2_iso14443a.c') diff --git a/rfid_layer2_iso14443a.c b/rfid_layer2_iso14443a.c index 7d7c377..d93f917 100644 --- a/rfid_layer2_iso14443a.c +++ b/rfid_layer2_iso14443a.c @@ -55,12 +55,13 @@ iso14443a_transcieve_acf(struct rfid_layer2_handle *handle, /* Transmit a regular frame */ static int iso14443a_transcieve(struct rfid_layer2_handle *handle, + enum rfid_frametype frametype, const unsigned char *tx_buf, unsigned int tx_len, unsigned char *rx_buf, unsigned int *rx_len, u_int64_t timeout, unsigned int flags) { - return handle->rh->reader->transcieve(handle->rh, tx_buf, tx_len, - rx_buf, rx_len, timeout, flags); + return handle->rh->reader->transcieve(handle->rh, frametype, tx_buf, + tx_len, rx_buf, rx_len, timeout, flags); } static int @@ -155,7 +156,8 @@ cascade: } iso14443a_code_nvb_bits(&acf.nvb, 7*8); - ret = iso14443a_transcieve(handle, (unsigned char *)&acf, 7, + ret = iso14443a_transcieve(handle, RFID_14443A_FRAME_REGULAR, + (unsigned char *)&acf, 7, (unsigned char *) &sak, &rx_len, TIMEOUT, 0); if (ret < 0) @@ -238,7 +240,8 @@ iso14443a_hlta(struct rfid_layer2_handle *handle) unsigned char rx_buf[10]; unsigned int rx_len = sizeof(rx_buf); - ret = iso14443a_transcieve(handle, tx_buf, sizeof(tx_buf), + ret = iso14443a_transcieve(handle, RFID_14443A_FRAME_REGULAR, + tx_buf, sizeof(tx_buf), rx_buf, &rx_len, 1000 /* 1ms */, 0); if (ret < 0) { /* "error" case: we don't get somethng back from the card */ -- cgit v1.2.3