4 #define RCTX_SIZE_LARGE 2048
5 #define RCTX_SIZE_SMALL 64
7 #define MAX_HDRSIZE sizeof(struct openpcd_hdr)
8 #define MAX_REQSIZE (64-MAX_HDRSIZE)
10 #define req_buf_payload(x) (x->data[x->hdr_len])
11 #define req_buf_hdr(x) (x->data[0])
13 #include <sys/types.h>
14 #include <lib_AT91SAM7.h>
17 volatile u_int32_t state;
23 #define RCTX_STATE_FREE 0xfe
24 #define RCTX_STATE_UDP_RCV_BUSY 0x01
25 #define RCTX_STATE_UDP_RCV_DONE 0x02
26 #define RCTX_STATE_MAIN_PROCESSING 0x03
27 #define RCTX_STATE_RC632IRQ_BUSY 0x04
29 #define RCTX_STATE_UDP_EP2_PENDING 0x10
30 #define RCTX_STATE_UDP_EP2_BUSY 0x11
32 #define RCTX_STATE_UDP_EP3_PENDING 0x12
33 #define RCTX_STATE_UDP_EP3_BUSY 0x13
35 #define RCTX_STATE_SSC_RX_BUSY 0x20
37 #define RCTX_STATE_LIBRFID_BUSY 0x30
39 #define RCTX_STATE_PIOIRQ_BUSY 0x80
41 #define RCTX_STATE_INVALID 0xff
43 extern struct req_ctx __ramfunc *req_ctx_find_get(int large, unsigned long old_state, unsigned long new_state);
44 extern struct req_ctx *req_ctx_find_busy(void);
45 extern void req_ctx_set_state(struct req_ctx *ctx, unsigned long new_state);
46 extern void req_ctx_put(struct req_ctx *ctx);
47 extern u_int8_t req_ctx_num(struct req_ctx *ctx);
49 #endif /* _REQ_CTX_H */