12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef USBPIC_H
- #define USBPIC_H
- #define UOWN 0x80
- #define DTS 0x40
- #define KEN 0x20
- #define INCDIS 0x10
- #define DTSEN 0x08
- #define BSTALL 0x04
- #define BC9 0x02
- #define BC8 0x01
- typedef struct _BDT
- {
- unsigned char STAT;
- unsigned char CNT;
- unsigned int ADDR;
- } BDT;
- typedef struct _setup_packet_struct
- {
- unsigned char bmrequesttype;
- unsigned char brequest;
- unsigned char wvalue0;
- unsigned char wvalue1;
- unsigned char windex0;
- unsigned char windex1;
- unsigned short wlength;
- unsigned char extra[56];
- } setup_packet_struct;
- #define USTAT_IN (0x04)
- #define USTAT_OUT (0x00)
- volatile BDT __at (0x0400+0*8) ep0_o;
- volatile BDT __at (0x0404+0*8) ep0_i;
- volatile BDT __at (0x0400+1*8) ep1_o;
- volatile BDT __at (0x0404+1*8) ep1_i;
- volatile BDT __at (0x0400+2*8) ep2_o;
- volatile BDT __at (0x0404+2*8) ep2_i;
- volatile BDT __at (0x0400+3*8) ep3_o;
- volatile BDT __at (0x0404+3*8) ep3_i;
- #endif
|