diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-10-23 20:03:56 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-10-23 20:03:56 +0000 |
commit | b9e8c17d8c4f28938c7cb0a665a1f21232ebdf66 (patch) | |
tree | d4d3004078f2de09d76f2798fba06d4eecc25a77 /rfid_proto_mifare_ul.c | |
parent | 5fc01ff6f98d72219420bc29fb59d2d6eb93e887 (diff) |
make "frametype" a parameter of transcieve functions
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1559 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'rfid_proto_mifare_ul.c')
-rw-r--r-- | rfid_proto_mifare_ul.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |