diff options
author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-03 11:18:08 +0000 |
---|---|---|
committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-03 11:18:08 +0000 |
commit | 872a81da6f50d6fda706d7ebd043147cb1be70ad (patch) | |
tree | dec48213c7974c2da7d4674b77c04a8d9392d27d /openpcd/firmware/src/openpcd.h | |
parent | f57b548db6994032649fb33b682055a77d5d2617 (diff) |
update
git-svn-id: https://svn.openpcd.org:2342/trunk@3 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd/firmware/src/openpcd.h')
-rw-r--r-- | openpcd/firmware/src/openpcd.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/openpcd/firmware/src/openpcd.h b/openpcd/firmware/src/openpcd.h new file mode 100644 index 0000000..2a293b3 --- /dev/null +++ b/openpcd/firmware/src/openpcd.h @@ -0,0 +1,30 @@ +#ifndef _OPENPCD_H +#define _OPENPCD_H + +#define OPENPCD_RC632_IRQ AT91C_PA30_IRQ1 +#define OPENPCD_RC632_RESET AT91C_PIO_PA29 +#define OPENPCD_LED1_GREEN AT91C_PIO_PA25 +#define OPENPCD_LED2_RED AT91C_PIO_PA26 + +#define MAX_REQSIZE 256 +#define MAX_HDRSIZE 8 + +#define req_buf_payload(x) (x->data[x->hdr_len]) +#define req_buf_hdr(x) (x->data[0]) + +struct req_buf { + u_int16_t hdr_len; + u_int16_t tot_len; + u_int8_t data[MAX_REQSIZE+MAX_HDRSIZE]; +}; + +struct req_ctx { + u_int16_t seq; /* request sequence number */ + + u_int32_t flags; + + struct req_buf rx; + struct req_buf tx; +}; + +#endif /* _OPENPCD_H */ |