diff options
author | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-21 23:47:38 +0000 |
---|---|---|
committer | (no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-07-21 23:47:38 +0000 |
commit | 413333331aa5db1a9d18be6bfb76ccd84f761ac4 (patch) | |
tree | ffb95535b21039ee36cc097339b0593c5299046e /openpcd/firmware/include/openpcd.h | |
parent | a5a204c6a5fa2b41c9795c68a416d9ea47fa903c (diff) |
fix spi
git-svn-id: https://svn.openpcd.org:2342/trunk@9 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpcd/firmware/include/openpcd.h')
-rw-r--r-- | openpcd/firmware/include/openpcd.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/openpcd/firmware/include/openpcd.h b/openpcd/firmware/include/openpcd.h index dd68d52..cd85af2 100644 --- a/openpcd/firmware/include/openpcd.h +++ b/openpcd/firmware/include/openpcd.h @@ -1,9 +1,24 @@ #ifndef _OPENPCD_H #define _OPENPCD_H +#include <include/types.h> #include <include/AT91SAM7S64.h> -#define OPENPCD_RC632_IRQ AT91C_ID_IRQ1 -#define OPENPCD_RC632_RESET AT91C_PIO_PA29 +struct openpcd_hdr { + u_int8_t cmd; /* command */ + u_int8_t flags; + u_int8_t reg; /* register */ + u_int8_t val; /* value (in case of write *) */ + u_int16_t len; + u_int8_t data[0]; +} __attribute__ ((packed)); + +#define OPENPCD_CMD_WRITE_REG 0x01 +#define OPENPCD_CMD_WRITE_FIFO 0x02 +#define OPENPCD_CMD_WRITE_VFIFO 0x03 +#define OPENPCD_CMD_READ_REG 0x11 +#define OPENPCD_CMD_READ_FIFO 0x12 +#define OPENPCD_CMD_READ_VFIFO 0x13 +#define OPENPCD_CMD_SET_LED 0x21 #endif |