Skip to content

Commit

Permalink
Update USB PMA check to take CAN into account
Browse files Browse the repository at this point in the history
  • Loading branch information
devanlai committed May 21, 2017
1 parent 488dcdb commit 9612bc8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/USB/composite_usb_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ _Static_assert((1 + NUM_OUT_ENDPOINTS <= 8), "Too many OUT endpoints for USB cor
+ CDC_PMA_USAGE \
+ VCDC_PMA_USAGE)

_Static_assert((TOTAL_PMA_USAGE <= USB_PMA_SIZE), "USB packet memory area overallocated");
#if CAN_RX_AVAILABLE && VCDC_AVAILABLE
#define MAX_USB_PMA_SIZE USB_PMA_SIZE_WITH_CAN
#else
#define MAX_USB_PMA_SIZE USB_PMA_SIZE
#endif

_Static_assert((TOTAL_PMA_USAGE <= MAX_USB_PMA_SIZE), "USB packet memory area overallocated");

static const struct usb_device_descriptor dev = {
.bLength = USB_DT_DEVICE_SIZE,
Expand Down

0 comments on commit 9612bc8

Please sign in to comment.