aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-31 10:27:30 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-31 10:27:30 -0300
commit06dc7fbb1e85f63e5aa092cb5656ea7627a3ad01 (patch)
tree20146f7d063a4bb7546ac4c00404e0c1587de874 /testhal
parent91fd21695b3030e5785b4bd90655fd6f54925abe (diff)
downloadChibiOS-Contrib-06dc7fbb1e85f63e5aa092cb5656ea7627a3ad01.tar.gz
ChibiOS-Contrib-06dc7fbb1e85f63e5aa092cb5656ea7627a3ad01.tar.bz2
ChibiOS-Contrib-06dc7fbb1e85f63e5aa092cb5656ea7627a3ad01.zip
USBH: testhal MSD: abort read on error
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/main.c b/testhal/STM32/STM32F4xx/USB_HOST/main.c
index 215b9ec..44210a3 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/main.c
+++ b/testhal/STM32/STM32F4xx/USB_HOST/main.c
@@ -374,7 +374,8 @@ start:
usbDbgPrintf("BLK: Raw read test (%dMB, %dB blocks)", RAW_READ_SZ_MB, sizeof(fbuff));
st = chVTGetSystemTime();
for (j = 0; j < NITERATIONS; j++) {
- blkRead(&MSBLKD[0], start, fbuff, NBLOCKS);
+ if (blkRead(&MSBLKD[0], start, fbuff, NBLOCKS) != HAL_SUCCESS)
+ goto start;
start += NBLOCKS;
}
et = chVTGetSystemTime();