aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/usbh/hal_usbh_msd.c
diff options
context:
space:
mode:
authorUladzimir Pylinski <barthess@yandex.ru>2017-06-09 08:10:34 +0300
committerGitHub <noreply@github.com>2017-06-09 08:10:34 +0300
commitca686a5cbab4a2c6de321e7f1a9c06c28fd56f9a (patch)
tree0f90e9cc2f1cceee038eaabd3a21892e7d8b0ea8 /os/hal/src/usbh/hal_usbh_msd.c
parent830f09e2b7d9af3146b1ecd8821664d874355005 (diff)
parent4483baab02f3a80d262d42cb69961f1f349b5d1e (diff)
downloadChibiOS-Contrib-ca686a5cbab4a2c6de321e7f1a9c06c28fd56f9a.tar.gz
ChibiOS-Contrib-ca686a5cbab4a2c6de321e7f1a9c06c28fd56f9a.tar.bz2
ChibiOS-Contrib-ca686a5cbab4a2c6de321e7f1a9c06c28fd56f9a.zip
Merge pull request #118 from dismirlian/usbh_devel
USBH: fix compile with IAR
Diffstat (limited to 'os/hal/src/usbh/hal_usbh_msd.c')
-rw-r--r--os/hal/src/usbh/hal_usbh_msd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/src/usbh/hal_usbh_msd.c b/os/hal/src/usbh/hal_usbh_msd.c
index 121e730..b564e8e 100644
--- a/os/hal/src/usbh/hal_usbh_msd.c
+++ b/os/hal/src/usbh/hal_usbh_msd.c
@@ -347,7 +347,7 @@ static msd_bot_result_t _msd_bot_transaction(msd_transaction_t *tran, USBHMassSt
if (status == USBH_URBSTATUS_STALL) {
uerrf("\tMSD: Data phase: USBH_URBSTATUS_STALL, clear halt");
- status = usbhEPReset(ep);
+ status = (usbhEPReset(ep) == HAL_SUCCESS) ? USBH_URBSTATUS_OK : USBH_URBSTATUS_ERROR;
}
if (status != USBH_URBSTATUS_OK) {
@@ -365,7 +365,7 @@ static msd_bot_result_t _msd_bot_transaction(msd_transaction_t *tran, USBHMassSt
if (status == USBH_URBSTATUS_STALL) {
uwarn("\tMSD: Status phase: USBH_URBSTATUS_STALL, clear halt and retry");
- status = usbhEPReset(&lunp->msdp->epin);
+ status = (usbhEPReset(&lunp->msdp->epin) == HAL_SUCCESS) ? USBH_URBSTATUS_OK : USBH_URBSTATUS_ERROR;
if (status == USBH_URBSTATUS_OK) {
status = usbhBulkTransfer(&lunp->msdp->epin, &csw,