diff options
author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-23 20:30:26 +0000 |
---|---|---|
committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-08-23 20:30:26 +0000 |
commit | ae585a40d827abcca2d8fb8d50ec52d6db1b43d2 (patch) | |
tree | b9dbb62e5791efcbfde2d8b7813d15dd058755de | |
parent | cc0a7ad63f71f75972d5764ce4294f15c24c18b3 (diff) |
- fix size for request contexts to 64 bytes
- fix GPIO definitions for olimex board
git-svn-id: https://svn.openpcd.org:2342/trunk@128 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r-- | openpcd/firmware/src/openpcd.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/openpcd/firmware/src/openpcd.h b/openpcd/firmware/src/openpcd.h index db5b845..51f3592 100644 --- a/openpcd/firmware/src/openpcd.h +++ b/openpcd/firmware/src/openpcd.h @@ -1,10 +1,13 @@ #ifndef _OPENPCD_H #define _OPENPCD_H +#include <openpcd.h> + #ifdef OLIMEX #define OPENPCD_PIO_LED2 AT91C_PIO_PA17 #define OPENPCD_PIO_LED1 AT91C_PIO_PA18 -#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA25 +#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA24 +#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA16 #else #define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA15 #define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA16 @@ -30,8 +33,8 @@ #define OPENPCD_IRQ_PRIO_UDP (AT91C_AIC_PRIOR_LOWEST+1) #define OPENPCD_IRQ_PRIO_RC632 AT91C_AIC_PRIOR_LOWEST -#define MAX_REQSIZE 64 -#define MAX_HDRSIZE 8 +#define MAX_HDRSIZE sizeof(struct openpcd_hdr) +#define MAX_REQSIZE (64-MAX_HDRSIZE) #define req_buf_payload(x) (x->data[x->hdr_len]) #define req_buf_hdr(x) (x->data[0]) @@ -41,7 +44,7 @@ struct req_buf { u_int16_t hdr_len; u_int16_t tot_len; - u_int8_t data[MAX_REQSIZE+MAX_HDRSIZE]; + u_int8_t data[64]; }; struct req_ctx { |