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_proto_mifare_ul.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rfid_proto_mifare_ul.c') diff --git a/rfid_proto_mifare_ul.c b/rfid_proto_mifare_ul.c index adac9cc..9e5363f 100644 --- a/rfid_proto_mifare_ul.c +++ b/rfid_proto_mifare_ul.c @@ -52,7 +52,8 @@ mful_read(struct rfid_protocol_handle *ph, unsigned int page, tx[0] = MIFARE_UL_CMD_READ; tx[1] = page & 0xff; - ret = ph->l2h->l2->fn.transcieve(ph->l2h, tx, sizeof(tx), rx_buf, + ret = ph->l2h->l2->fn.transcieve(ph->l2h, RFID_14443A_FRAME_REGULAR, + tx, sizeof(tx), rx_buf, &real_rx_len, MIFARE_UL_READ_FWT, 0); if (ret < 0) @@ -76,10 +77,8 @@ mful_write(struct rfid_protocol_handle *ph, unsigned int page, unsigned int rx_len = sizeof(rx); int ret; -#if 0 if (tx_len != 4 || page > MIFARE_UL_PAGE_MAX) return -EINVAL; -#endif tx[0] = MIFARE_UL_CMD_WRITE; tx[1] = page & 0xff; @@ -87,8 +86,9 @@ mful_write(struct rfid_protocol_handle *ph, unsigned int page, for (i = 0; i < 4; i++) tx[2+i] = tx_data[i]; - ret = ph->l2h->l2->fn.transcieve(ph->l2h, tx, sizeof(tx), rx, - &rx_len, MIFARE_UL_WRITE_FWT, 0); + ret = ph->l2h->l2->fn.transcieve(ph->l2h, RFID_14443A_FRAME_REGULAR, + tx, sizeof(tx), rx, &rx_len, + MIFARE_UL_WRITE_FWT, 0); if (ret < 0) return ret; -- cgit v1.2.3