|
2 | 2 | #ifndef HPL_USB_CONFIG_H |
3 | 3 | #define HPL_USB_CONFIG_H |
4 | 4 |
|
| 5 | +// CIRCUITPY: |
| 6 | + |
| 7 | +// Use 64-byte USB buffers for endpoint directions that are in use. They're set to 0 below otherwise. |
| 8 | + |
| 9 | +#include "genhdr/autogen_usb_descriptor.h" |
| 10 | + |
| 11 | +#if defined(USB_ENDPOINT_1_OUT_USED) && USB_ENDPOINT_1_OUT_USED |
| 12 | +#define CONF_USB_EP1_CACHE 64 |
| 13 | +#endif |
| 14 | +#if defined(USB_ENDPOINT_1_IN_USED) && USB_ENDPOINT_1_IN_USED |
| 15 | +#define CONF_USB_EP1_I_CACHE 64 |
| 16 | +#endif |
| 17 | + |
| 18 | +#if defined(USB_ENDPOINT_2_OUT_USED) && USB_ENDPOINT_2_OUT_USED |
| 19 | +#define CONF_USB_EP2_CACHE 64 |
| 20 | +#endif |
| 21 | +#if defined(USB_ENDPOINT_2_IN_USED) && USB_ENDPOINT_2_IN_USED |
| 22 | +#define CONF_USB_EP2_I_CACHE 64 |
| 23 | +#endif |
| 24 | + |
| 25 | +#if defined(USB_ENDPOINT_3_OUT_USED) && USB_ENDPOINT_3_OUT_USED |
| 26 | +#define CONF_USB_EP3_CACHE 64 |
| 27 | +#endif |
| 28 | +#if defined(USB_ENDPOINT_3_IN_USED) && USB_ENDPOINT_3_IN_USED |
| 29 | +#define CONF_USB_EP3_I_CACHE 64 |
| 30 | +#endif |
| 31 | + |
| 32 | +#if defined(USB_ENDPOINT_4_OUT_USED) && USB_ENDPOINT_4_OUT_USED |
| 33 | +#define CONF_USB_EP4_CACHE 64 |
| 34 | +#endif |
| 35 | +#if defined(USB_ENDPOINT_4_IN_USED) && USB_ENDPOINT_4_IN_USED |
| 36 | +#define CONF_USB_EP4_I_CACHE 64 |
| 37 | +#endif |
| 38 | + |
| 39 | +#if defined(USB_ENDPOINT_5_OUT_USED) && USB_ENDPOINT_5_OUT_USED |
| 40 | +#define CONF_USB_EP5_CACHE 64 |
| 41 | +#endif |
| 42 | +#if defined(USB_ENDPOINT_5_IN_USED) && USB_ENDPOINT_5_IN_USED |
| 43 | +#define CONF_USB_EP5_I_CACHE 64 |
| 44 | +#endif |
| 45 | + |
| 46 | +#if defined(USB_ENDPOINT_6_OUT_USED) && USB_ENDPOINT_6_OUT_USED |
| 47 | +#define CONF_USB_EP6_CACHE 64 |
| 48 | +#endif |
| 49 | +#if defined(USB_ENDPOINT_6_IN_USED) && USB_ENDPOINT_6_IN_USED |
| 50 | +#define CONF_USB_EP6_I_CACHE 64 |
| 51 | +#endif |
| 52 | + |
| 53 | +#if defined(USB_ENDPOINT_7_OUT_USED) && USB_ENDPOINT_7_OUT_USED |
| 54 | +#define CONF_USB_EP7_CACHE 64 |
| 55 | +#endif |
| 56 | +#if defined(USB_ENDPOINT_7_IN_USED) && USB_ENDPOINT_7_IN_USED |
| 57 | +#define CONF_USB_EP7_I_CACHE 64 |
| 58 | +#endif |
| 59 | + |
| 60 | + |
5 | 61 | // <<< Use Configuration Wizard in Context Menu >>> |
6 | 62 |
|
7 | 63 | #define CONF_USB_N_0 0 |
|
102 | 158 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
103 | 159 | // <id> usb_arch_ep1_cache |
104 | 160 | #ifndef CONF_USB_EP1_CACHE |
105 | | -#define CONF_USB_EP1_CACHE 64 |
| 161 | +#define CONF_USB_EP1_CACHE 0 |
106 | 162 | #endif |
107 | 163 |
|
108 | 164 | // <o> Cache buffer size for EP1 IN |
|
140 | 196 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
141 | 197 | // <id> usb_arch_ep2_cache |
142 | 198 | #ifndef CONF_USB_EP2_CACHE |
143 | | -#define CONF_USB_EP2_CACHE 64 |
| 199 | +#define CONF_USB_EP2_CACHE 0 |
144 | 200 | #endif |
145 | 201 |
|
146 | 202 | // <o> Cache buffer size for EP2 IN |
|
158 | 214 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
159 | 215 | // <id> usb_ep2_I_CACHE |
160 | 216 | #ifndef CONF_USB_EP2_I_CACHE |
161 | | -#define CONF_USB_EP2_I_CACHE 64 |
| 217 | +#define CONF_USB_EP2_I_CACHE 0 |
162 | 218 | #endif |
163 | 219 | // </h> |
164 | 220 |
|
|
178 | 234 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
179 | 235 | // <id> usb_arch_ep3_cache |
180 | 236 | #ifndef CONF_USB_EP3_CACHE |
181 | | -#define CONF_USB_EP3_CACHE 64 |
| 237 | +#define CONF_USB_EP3_CACHE 0 |
182 | 238 | #endif |
183 | 239 |
|
184 | 240 | // <o> Cache buffer size for EP3 IN |
|
216 | 272 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
217 | 273 | // <id> usb_arch_ep4_cache |
218 | 274 | #ifndef CONF_USB_EP4_CACHE |
219 | | -#define CONF_USB_EP4_CACHE 64 |
| 275 | +#define CONF_USB_EP4_CACHE 0 |
220 | 276 | #endif |
221 | 277 |
|
222 | 278 | // <o> Cache buffer size for EP4 IN |
|
254 | 310 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
255 | 311 | // <id> usb_arch_ep5_cache |
256 | 312 | #ifndef CONF_USB_EP5_CACHE |
257 | | -#define CONF_USB_EP5_CACHE 64 |
| 313 | +#define CONF_USB_EP5_CACHE 0 |
258 | 314 | #endif |
259 | 315 |
|
260 | 316 | // <o> Cache buffer size for EP5 IN |
|
292 | 348 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
293 | 349 | // <id> usb_arch_ep6_cache |
294 | 350 | #ifndef CONF_USB_EP6_CACHE |
295 | | -#define CONF_USB_EP6_CACHE 64 |
| 351 | +#define CONF_USB_EP6_CACHE 0 |
296 | 352 | #endif |
297 | 353 |
|
298 | 354 | // <o> Cache buffer size for EP6 IN |
|
310 | 366 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
311 | 367 | // <id> usb_ep6_I_CACHE |
312 | 368 | #ifndef CONF_USB_EP6_I_CACHE |
313 | | -#define CONF_USB_EP6_I_CACHE 64 |
| 369 | +#define CONF_USB_EP6_I_CACHE 0 |
314 | 370 | #endif |
315 | 371 | // </h> |
316 | 372 |
|
|
330 | 386 | // <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) |
331 | 387 | // <id> usb_arch_ep7_cache |
332 | 388 | #ifndef CONF_USB_EP7_CACHE |
333 | | -#define CONF_USB_EP7_CACHE 64 |
| 389 | +#define CONF_USB_EP7_CACHE 0 |
334 | 390 | #endif |
335 | 391 |
|
336 | 392 | // <o> Cache buffer size for EP7 IN |
|
0 commit comments