27 #ifndef HW_USBD_IP9208_H 28 #define HW_USBD_IP9208_H 43 #define _BIT(n) (((uint32_t)(1ul)) << (n)) 50 #define _SBF(f,v) (((uint32_t)(v)) << (f)) 58 typedef volatile struct 60 volatile uint8_t RESERVED0[0x100];
62 volatile uint8_t caplength;
63 volatile uint8_t _otg1[1];
64 volatile uint16_t hciversion;
65 volatile uint32_t hcsparams;
66 volatile uint32_t hccparams;
67 volatile uint32_t _otg2[5];
68 volatile uint16_t dciversion;
69 volatile uint16_t _otg3[1];
70 volatile uint32_t dccparams;
71 volatile uint32_t _otg4a[4];
72 volatile uint32_t usb_up_int;
73 volatile uint32_t _otg4b[1];
76 volatile uint32_t usbcmd;
77 volatile uint32_t usbsts;
78 volatile uint32_t usbintr;
79 volatile uint32_t frindex;
80 volatile uint32_t _otg5[1];
81 volatile uint32_t periodiclistbase__deviceaddr;
82 volatile uint32_t asynclistaddr__endpointlistaddr;
83 volatile uint32_t ttctrl;
84 volatile uint32_t burstsize;
85 volatile uint32_t txfilltuning;
86 volatile uint32_t txttfilltuning;
87 volatile uint32_t _otg6[1];
88 volatile uint32_t _otg7[2];
89 volatile uint32_t endptnak;
90 volatile uint32_t endptnaken;
91 volatile uint32_t configflag;
92 volatile uint32_t portsc1;
93 volatile uint32_t _otg8[7];
94 volatile uint32_t otgsc;
95 volatile uint32_t usbmode;
96 volatile uint32_t endptsetupstat;
97 volatile uint32_t endptprime;
98 volatile uint32_t endptflush;
99 volatile uint32_t endptstatus;
100 volatile uint32_t endptcomplete;
101 volatile uint32_t endptctrl[4];
106 typedef volatile struct 108 volatile uint32_t next_dTD;
109 volatile uint32_t total_bytes ;
110 volatile uint32_t buffer0;
111 volatile uint32_t buffer1;
112 volatile uint32_t buffer2;
113 volatile uint32_t buffer3;
114 volatile uint32_t buffer4;
115 volatile uint32_t reserved;
119 typedef volatile struct 121 volatile uint32_t cap;
122 volatile uint32_t curr_dTD;
123 volatile uint32_t next_dTD;
124 volatile uint32_t total_bytes;
125 volatile uint32_t buffer0;
126 volatile uint32_t buffer1;
127 volatile uint32_t buffer2;
128 volatile uint32_t buffer3;
129 volatile uint32_t buffer4;
130 volatile uint32_t reserved;
131 volatile uint32_t setup[2];
132 volatile uint32_t gap[4];
137 #define USBCMD_RS _BIT(0) 138 #define USBCMD_RST _BIT(1) 139 #define USBCMD_ATDTW _BIT(12) 140 #define USBCMD_SUTW _BIT(13) 143 #define USBSTS_UI _BIT(0) 144 #define USBSTS_UEI _BIT(1) 145 #define USBSTS_PCI _BIT(2) 146 #define USBSTS_URI _BIT(6) 147 #define USBSTS_SRI _BIT(7) 148 #define USBSTS_SLI _BIT(8) 149 #define USBSTS_NAKI _BIT(16) 152 #define USBDEV_ADDR_AD _BIT(24) 153 #define USBDEV_ADDR(n) _SBF(25, ((n) & 0x7F)) 156 #define USBPRTS_CCS _BIT(0) 157 #define USBPRTS_PE _BIT(2) 158 #define USBPRTS_FPR _BIT(6) 159 #define USBPRTS_SUSP _BIT(7) 160 #define USBPRTS_PR _BIT(8) 161 #define USBPRTS_HSP _BIT(9) 162 #define USBPRTS_PLPSCD _BIT(23) 163 #define USBPRTS_PFSC _BIT(24) 166 #define USBMODE_CM_IDLE _SBF(0, 0x0) 167 #define USBMODE_CM_DEV _SBF(0, 0x2) 168 #define USBMODE_CM_HOST _SBF(0, 0x3) 169 #define USBMODE_SLOM _BIT(3) 170 #define USBMODE_SDIS _BIT(4) 173 #define USB_EP_BITPOS(n) (((n) & 0x80)? (0x10 | ((n) & 0x7)) : ((n) & 0x7)) 176 #define EPCTRL_RXS _BIT(0) 177 #define EPCTRL_RX_TYPE(n) _SBF(2,((n) & 0x3)) 178 #define EPCTRL_RX_CTL _SBF(2,0) 179 #define EPCTRL_RX_ISO _SBF(2,1) 180 #define EPCTRL_RX_BLK _SBF(2,2) 181 #define EPCTRL_RXI _BIT(5) 182 #define EPCTRL_RXR _BIT(6) 183 #define EPCTRL_RXE _BIT(7) 184 #define EPCTRL_TXS _BIT(16) 185 #define EPCTRL_TX_TYPE(n) _SBF(18,((n) & 0x3)) 186 #define EPCTRL_TX_CTL _SBF(18,0) 187 #define EPCTRL_TX_ISO _SBF(18,1) 188 #define EPCTRL_TX_BLK _SBF(18,2) 189 #define EPCTRL_TX_INT _SBF(18,3) 190 #define EPCTRL_TXI _BIT(21) 191 #define EPCTRL_TXR _BIT(22) 192 #define EPCTRL_TXE _BIT(23) 196 #define QH_MAX_PKT_LEN_POS 16 197 #define QH_MAXP(n) _SBF(16,((n) & 0x7FF)) 198 #define QH_IOS _BIT(15) 199 #define QH_ZLT _BIT(29) 200 #define QH_MULT(n) _SBF(30,((n) & 0x3)) 201 #define QH_MULT_MASK _SBF(30, 0x3) 204 #define TD_NEXT_TERMINATE _BIT(0) 205 #define TD_IOC _BIT(15) Definition: hw_usbd_ip9028.h:106
Definition: hw_usbd_ip9028.h:58
Definition: hw_usbd_ip9028.h:119