stm32: Fix usbfs rx buffer sizing

The usbfs receive buffers must also have space for the 2 byte crc at
the end of a transmission.  This fixes an error that could lead to
lost messages from mcu to host (resulting in bytes_invalid increasing
in stats) on the stm32f103.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-09-16 19:33:06 -04:00
parent 045c938a61
commit 4f889ecd93
1 changed files with 2 additions and 2 deletions

View File

@ -29,9 +29,9 @@ struct ep_desc {
struct ep_mem { struct ep_mem {
struct ep_desc ep0, ep_acm, ep_bulk_out, ep_bulk_in; struct ep_desc ep0, ep_acm, ep_bulk_out, ep_bulk_in;
uint32_t ep0_tx[USB_CDC_EP0_SIZE / 2]; uint32_t ep0_tx[USB_CDC_EP0_SIZE / 2];
uint32_t ep0_rx[USB_CDC_EP0_SIZE / 2]; uint32_t ep0_rx[USB_CDC_EP0_SIZE / 2 + 1];
uint32_t ep_acm_tx[USB_CDC_EP_ACM_SIZE / 2]; uint32_t ep_acm_tx[USB_CDC_EP_ACM_SIZE / 2];
uint32_t ep_bulk_out_rx[USB_CDC_EP_BULK_OUT_SIZE / 2]; uint32_t ep_bulk_out_rx[USB_CDC_EP_BULK_OUT_SIZE / 2 + 1];
uint32_t ep_bulk_in_tx[USB_CDC_EP_BULK_IN_SIZE / 2]; uint32_t ep_bulk_in_tx[USB_CDC_EP_BULK_IN_SIZE / 2];
}; };