File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
source/hic_hal/atmel/sam3u2c Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 430
430
// </e>
431
431
// </e>
432
432
433
- #define USBD_BULK_ENABLE BULK_ENDPOINT //no endpts left
434
- #define USBD_BULK_EP_BULKIN 7
435
- #define USBD_BULK_EP_BULKOUT 8
433
+ #define USBD_BULK_ENABLE BULK_ENDPOINT
434
+ // We don't have enough endpoints for BULK unless MSC or CDC are disabled.
435
+ // MSC is the best choice, since this is only useful in the fixed target IF config and we can still upload firmware via DAP.
436
+ // We'll still want MSC for the BL though, but in that case BULK isn't useful anyway.
437
+ #if USBD_MSC_ENABLE == 0
438
+ #define USBD_BULK_EP_BULKIN 1 // Use the MSC endpoints for BULK
439
+ #define USBD_BULK_EP_BULKOUT 2
440
+ #elif USBD_CDC_ACM_ENABLE == 0
441
+ #define USBD_BULK_EP_BULKIN 5 // Use the CDC endpoints for BULK
442
+ #define USBD_BULK_EP_BULKOUT 6
443
+ #else
444
+ #define USBD_BULK_EP_BULKIN 7 // Use non-existent endpoints to force an error
445
+ #define USBD_BULK_EP_BULKOUT 8 // if BULK is enabled but MSC + CDC are still enabled
446
+ #endif
447
+
436
448
#define USBD_BULK_WMAXPACKETSIZE 64
437
449
#define USBD_BULK_HS_ENABLE 1
438
450
#define USBD_BULK_HS_WMAXPACKETSIZE 512
You can’t perform that action at this time.
0 commit comments