openpcd/openpicc/application/tc_recv.h @ master
1 |
#ifndef TC_RECV_H_
|
---|---|
2 |
#define TC_RECV_H_
|
3 |
|
4 |
#include "iso14443.h"
|
5 |
|
6 |
#define TC_RECV_NUMBER_OF_FRAME_BUFFERS 10
|
7 |
|
8 |
struct tc_recv_handle; |
9 |
typedef struct tc_recv_handle *tc_recv_handle_t; |
10 |
|
11 |
typedef enum { |
12 |
TC_RECV_CALLBACK_RX_FRAME_ENDED, // *data is iso14443_frame *frame |
13 |
TC_RECV_CALLBACK_SETUP, // *data is tc_recv_handle_t th |
14 |
TC_RECV_CALLBACK_TEARDOWN, // *data is tc_recv_handle_t th |
15 |
} tc_recv_callback_reason; |
16 |
typedef void (*tc_recv_callback_t)(tc_recv_callback_reason reason, void *data); |
17 |
|
18 |
extern int tc_recv_init(tc_recv_handle_t *th, int pauses_count, tc_recv_callback_t callback); |
19 |
extern int tc_recv_receive(tc_recv_handle_t th, iso14443_frame* *frame, unsigned int timeout); |
20 |
|
21 |
#endif /*TC_RECV_H_*/ |