diff options
Diffstat (limited to 'include/rfid')
-rw-r--r-- | include/rfid/rfid.h | 4 | ||||
-rw-r--r-- | include/rfid/rfid_asic_rc632.h | 1 | ||||
-rw-r--r-- | include/rfid/rfid_layer2_iso14443a.h | 11 | ||||
-rw-r--r-- | include/rfid/rfid_reader.h | 1 |
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; |