diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-14 04:55:15 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-14 04:55:15 +0000 |
commit | e2e37bea66206adefbb2fc97fcbfb71c1a3cfbe7 (patch) | |
tree | 8e1edc0418be46c82e59e5782c9534ebf3d5651c /openpicc/application/tc_recv.h | |
parent | 9615190a75ab0304d37701e97947ffe36be2d345 (diff) |
Add T/C based receiver code with integrated miller decoder
Integrate T/C receiver into iso14443 layer 2a
Add state field to iso14443_frame, rename ssc buffer state constants
Sniffer seems to work with the new code
git-svn-id: https://svn.openpcd.org:2342/trunk@452 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_recv.h')
-rw-r--r-- | openpicc/application/tc_recv.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/openpicc/application/tc_recv.h b/openpicc/application/tc_recv.h new file mode 100644 index 0000000..4f2392b --- /dev/null +++ b/openpicc/application/tc_recv.h @@ -0,0 +1,21 @@ +#ifndef TC_RECV_H_ +#define TC_RECV_H_ + +#include "iso14443.h" + +#define TC_RECV_NUMBER_OF_FRAME_BUFFERS 10 + +struct tc_recv_handle; +typedef struct tc_recv_handle *tc_recv_handle_t; + +typedef enum { + TC_RECV_CALLBACK_RX_FRAME_ENDED, // *data is iso14443_frame *frame + TC_RECV_CALLBACK_SETUP, // *data is tc_recv_handle_t th + TC_RECV_CALLBACK_TEARDOWN, // *data is tc_recv_handle_t th +} tc_recv_callback_reason; +typedef void (*tc_recv_callback_t)(tc_recv_callback_reason reason, void *data); + +extern int tc_recv_init(tc_recv_handle_t *th, int pauses_count, tc_recv_callback_t callback); +extern int tc_recv_receive(tc_recv_handle_t th, iso14443_frame* *frame, unsigned int timeout); + +#endif /*TC_RECV_H_*/ |