From 3897fabc5c94f7041c95a13ad04d2e32c944c1f1 Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 14 Jun 2005 12:41:42 +0000 Subject: - start 15693 implementation - build a real library (librfid.a) git-svn-id: https://svn.gnumonks.org/trunk/librfid@1215 e0336214-984f-0b4b-a45f-81c69e1f0ede --- include/rfid/rfid_asic_rc632.h | 3 +++ include/rfid/rfid_layer2.h | 3 ++- include/rfid/rfid_layer2_iso15693.h | 48 +++++++++++++++++++++++++++++++++++++ include/rfid/rfid_reader.h | 2 +- 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 include/rfid/rfid_layer2_iso15693.h (limited to 'include/rfid') diff --git a/include/rfid/rfid_asic_rc632.h b/include/rfid/rfid_asic_rc632.h index f4c9fa1..4aabde2 100644 --- a/include/rfid/rfid_asic_rc632.h +++ b/include/rfid/rfid_asic_rc632.h @@ -51,6 +51,9 @@ struct rfid_asic_rc632 { struct { int (*init)(struct rfid_asic_handle *h); } iso14443b; + struct { + int (*init)(struct rfid_asic_handle *h); + } iso15693; } fn; }; diff --git a/include/rfid/rfid_layer2.h b/include/rfid/rfid_layer2.h index 40b9bff..975022a 100644 --- a/include/rfid/rfid_layer2.h +++ b/include/rfid/rfid_layer2.h @@ -6,6 +6,7 @@ struct rfid_reader_handle; #include #include +#include struct rfid_layer2 { @@ -31,7 +32,7 @@ struct rfid_layer2_handle { union { struct iso14443a_handle iso14443a; struct iso14443b_handle iso14443b; - //struct iso15693_handle iso15693; + struct iso15693_handle iso15693; } priv; struct rfid_layer2 *l2; }; diff --git a/include/rfid/rfid_layer2_iso15693.h b/include/rfid/rfid_layer2_iso15693.h new file mode 100644 index 0000000..b418ccd --- /dev/null +++ b/include/rfid/rfid_layer2_iso15693.h @@ -0,0 +1,48 @@ +#ifndef _RFID_ISO15693_H +#define _RFID_ISO15693_H + +#include + +/* protocol definitions */ + +struct iso15693_handle; + +struct iso15693_transport { + unsigned char *name; + + struct { + int (*init)(struct iso15693_handle *handle); + int (*fini)(struct iso15693_handle *handle); + +#if 0 + int (*transcieve_sf)(struct iso14443a_handle *handle, + unsigned char cmd, + struct iso14443a_atqa *atqa); + int (*transcieve_acf)(struct iso14443a_handle *handle, + struct iso14443a_anticol_cmd *acf, + unsigned int *bit_of_col); +#endif + int (*transcieve)(struct iso15693_handle *handle, + const unsigned char *tx_buf, + unsigned int tx_len, + unsigned char *rx_buf, + unsigned int *rx_len); + } fn; + + union { + } priv; +}; + +struct iso15693_handle { + unsigned int state; +}; + +enum iso15693_state { + ISO15693_STATE_ERROR, + ISO15693_STATE_NONE, +}; + +#include +extern struct rfid_layer2 rfid_layer2_iso15693; + +#endif /* _ISO15693_H */ diff --git a/include/rfid/rfid_reader.h b/include/rfid/rfid_reader.h index 11f2ca1..5f6c314 100644 --- a/include/rfid/rfid_reader.h +++ b/include/rfid/rfid_reader.h @@ -31,7 +31,7 @@ struct rfid_reader { unsigned int speed; } iso14443b; struct rfid_15693_reader { - + int (*init)(struct rfid_reader_handle *rh); } iso15693; struct rfid_reader *next; }; -- cgit v1.2.3