Skip to content

Commit 8cec0a8

Browse files
committed
Unnecessary PMA write removed.
1 parent ea44009 commit 8cec0a8

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

system/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c

-12
Original file line numberDiff line numberDiff line change
@@ -1353,30 +1353,18 @@ static HAL_StatusTypeDef PCD_EP_ISR_Handler(PCD_HandleTypeDef *hpcd)
13531353
if (ep->doublebuffer == 0U)
13541354
{
13551355
ep->xfer_count = PCD_GET_EP_TX_CNT(hpcd->Instance, ep->num);
1356-
if (ep->xfer_count != 0U)
1357-
{
1358-
USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaadress, ep->xfer_count);
1359-
}
13601356
}
13611357
else
13621358
{
13631359
if (PCD_GET_ENDPOINT(hpcd->Instance, ep->num) & USB_EP_DTOG_TX)
13641360
{
13651361
/*read from endpoint BUF0Addr buffer*/
13661362
ep->xfer_count = PCD_GET_EP_DBUF0_CNT(hpcd->Instance, ep->num);
1367-
if (ep->xfer_count != 0U)
1368-
{
1369-
USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr0, ep->xfer_count);
1370-
}
13711363
}
13721364
else
13731365
{
13741366
/*read from endpoint BUF1Addr buffer*/
13751367
ep->xfer_count = PCD_GET_EP_DBUF1_CNT(hpcd->Instance, ep->num);
1376-
if (ep->xfer_count != 0U)
1377-
{
1378-
USB_WritePMA(hpcd->Instance, ep->xfer_buff, ep->pmaaddr1, ep->xfer_count);
1379-
}
13801368
}
13811369
PCD_FreeUserBuffer(hpcd->Instance, ep->num, PCD_EP_DBUF_IN);
13821370
}

0 commit comments

Comments
 (0)