aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F7xx/USB_RAW/main.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-04-23 14:39:41 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-04-23 14:39:41 +0000
commitb898a2ee3141d05df99e1faf0bc3bdfd2a2e9ec1 (patch)
treed01de4d325675548712db5632efcd77f7f810167 /testhal/STM32/STM32F7xx/USB_RAW/main.c
parentece0fcd51efc71d000fbef8d3f6097d3a7089fd2 (diff)
downloadChibiOS-b898a2ee3141d05df99e1faf0bc3bdfd2a2e9ec1.tar.gz
ChibiOS-b898a2ee3141d05df99e1faf0bc3bdfd2a2e9ec1.tar.bz2
ChibiOS-b898a2ee3141d05df99e1faf0bc3bdfd2a2e9ec1.zip
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
Diffstat (limited to 'testhal/STM32/STM32F7xx/USB_RAW/main.c')
-rw-r--r--testhal/STM32/STM32F7xx/USB_RAW/main.c6
1 files changed, 3 insertions, 3 deletions
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);
}