From b898a2ee3141d05df99e1faf0bc3bdfd2a2e9ec1 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 23 Apr 2017 14:39:41 +0000 Subject: RX test is now done using packet-aligned buffers. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10166 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/STM32F7xx/USB_RAW/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testhal/STM32/STM32F7xx/USB_RAW/main.c') diff --git a/testhal/STM32/STM32F7xx/USB_RAW/main.c b/testhal/STM32/STM32F7xx/USB_RAW/main.c index f6eaa5bfc..f088eeebe 100644 --- a/testhal/STM32/STM32F7xx/USB_RAW/main.c +++ b/testhal/STM32/STM32F7xx/USB_RAW/main.c @@ -40,7 +40,7 @@ static const uint8_t txbuf[] = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"; -static uint8_t rxbuf[1024]; +static uint8_t rxbuf[1024 + 1]; /* * USB writer. This thread writes data to the USB at maximum rate. @@ -54,7 +54,7 @@ static THD_FUNCTION(Writer, arg) { chRegSetThreadName("writer"); while (true) { msg_t msg = usbTransmit(&USBD2, USBD2_DATA_REQUEST_EP, - txbuf, sizeof (txbuf) - 1); + txbuf, sizeof (txbuf)); if (msg == MSG_RESET) chThdSleepMilliseconds(500); } @@ -72,7 +72,7 @@ static THD_FUNCTION(Reader, arg) { chRegSetThreadName("reader"); while (true) { msg_t msg = usbReceive(&USBD2, USBD2_DATA_AVAILABLE_EP, - rxbuf, sizeof (rxbuf) - 1); + rxbuf, sizeof (rxbuf)); if (msg == MSG_RESET) chThdSleepMilliseconds(500); } -- cgit v1.2.3