summaryrefslogtreecommitdiff
path: root/firmware/src
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-03 15:41:14 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-03 15:41:14 +0000
commit9e6368f19515ff3008dede861e6086bd8e8e440b (patch)
treeda371477cecbc86fbbff258b8455d1d8c5e76cf1 /firmware/src
parentd9c442272ba6149da49a0b026630b704a9ade9e8 (diff)
- add function to read RC632 serial number
git-svn-id: https://svn.openpcd.org:2342/trunk@254 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src')
-rw-r--r--firmware/src/pcd/rc632_highlevel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/src/pcd/rc632_highlevel.c b/firmware/src/pcd/rc632_highlevel.c
index 825b760..c8fe40d 100644
--- a/firmware/src/pcd/rc632_highlevel.c
+++ b/firmware/src/pcd/rc632_highlevel.c
@@ -17,6 +17,9 @@
*
*/
+#ifdef DEBUG
+#undef DEBUG
+#endif
#include <sys/types.h>
#include <string.h>
@@ -1470,3 +1473,14 @@ rc632_mifare_transceive(struct rfid_asic_handle *handle,
return 0;
}
+#define RC632_E2_PRODUCT_TYPE 0
+#define RC632_E2_PRODUCT_SERIAL 8
+#define RC632_E2_RS_MAX_P 14
+
+int rc632_get_serial(struct rfid_asic_handle *handle,
+ u_int32_t *serial)
+{
+ return rc632_read_eeprom(handle, RC632_E2_PRODUCT_SERIAL,
+ 4, (u_int8_t *)serial);
+
+}
personal git repositories of Harald Welte. Your mileage may vary