summaryrefslogtreecommitdiff
path: root/include/rfid
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 12:19:38 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-11-08 12:19:38 +0000
commitb40ece7ac6d4c72cf8a648fd1b7eee30130eac77 (patch)
tree031da020e66b9ad329a3e5011ef416faa03dc6b6 /include/rfid
parent7600eb5ebbb8ac0f7532e7e7ae6cb5d4dc29d30b (diff)
implement and test baud rates of up to 848k
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1663 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'include/rfid')
-rw-r--r--include/rfid/rfid.h4
-rw-r--r--include/rfid/rfid_asic_rc632.h1
-rw-r--r--include/rfid/rfid_layer2_iso14443a.h11
-rw-r--r--include/rfid/rfid_reader.h1
4 files changed, 12 insertions, 5 deletions
diff --git a/include/rfid/rfid.h b/include/rfid/rfid.h
index 6bb5b58..6717ef8 100644
--- a/include/rfid/rfid.h
+++ b/include/rfid/rfid.h
@@ -15,8 +15,12 @@ enum rfid_frametype {
#define DEBUGPC(x, args ...) fprintf(stderr, x, ## args)
extern const char *rfid_hexdump(const void *data, unsigned int len);
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
+#endif /* __LIBRFID__ */
+
int rfid_init();
#endif /* _RFID_H */
diff --git a/include/rfid/rfid_asic_rc632.h b/include/rfid/rfid_asic_rc632.h
index 315fee2..e156814 100644
--- a/include/rfid/rfid_asic_rc632.h
+++ b/include/rfid/rfid_asic_rc632.h
@@ -52,6 +52,7 @@ struct rfid_asic_rc632 {
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col);
int (*set_speed)(struct rfid_asic_handle *h,
+ unsigned int tx,
unsigned int speed);
} iso14443a;
struct {
diff --git a/include/rfid/rfid_layer2_iso14443a.h b/include/rfid/rfid_layer2_iso14443a.h
index bd078ad..fc79bca 100644
--- a/include/rfid/rfid_layer2_iso14443a.h
+++ b/include/rfid/rfid_layer2_iso14443a.h
@@ -2,14 +2,15 @@
#define _RFID_ISO14443A_H
enum rfid_14443a_opt {
- RFID_OPT_14443A_SPEED = 0x00000001,
+ RFID_OPT_14443A_SPEED_RX = 0x00000001,
+ RFID_OPT_14443A_SPEED_TX = 0x00000002,
};
enum rfid_14443_opt_speed {
- RFID_14443A_SPEED_106K,
- RFID_14443A_SPEED_212K,
- RFID_14443A_SPEED_424K,
- RFID_14443A_SPEED_848K,
+ RFID_14443A_SPEED_106K = 0x01,
+ RFID_14443A_SPEED_212K = 0x02,
+ RFID_14443A_SPEED_424K = 0x04,
+ RFID_14443A_SPEED_848K = 0x08,
};
#ifdef __LIBRFID__
diff --git a/include/rfid/rfid_reader.h b/include/rfid/rfid_reader.h
index 364425c..78d07e4 100644
--- a/include/rfid/rfid_reader.h
+++ b/include/rfid/rfid_reader.h
@@ -26,6 +26,7 @@ struct rfid_reader {
struct iso14443a_anticol_cmd *cmd,
unsigned int *bit_of_col);
int (*set_speed)(struct rfid_reader_handle *h,
+ unsigned int tx,
unsigned int speed);
unsigned int speed;
} iso14443a;
personal git repositories of Harald Welte. Your mileage may vary