From 9e6368f19515ff3008dede861e6086bd8e8e440b Mon Sep 17 00:00:00 2001 From: laforge Date: Tue, 3 Oct 2006 15:41:14 +0000 Subject: - add function to read RC632 serial number git-svn-id: https://svn.openpcd.org:2342/trunk@254 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/src/pcd/rc632_highlevel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 #include @@ -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); + +} -- cgit v1.2.3