Tentative fix for OUT transactions, not complete.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5733 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
48eca9d659
commit
16de43cd02
|
@ -404,13 +404,16 @@ CH_IRQ_HANDLER(STM32_USB1_LP_HANDLER) {
|
||||||
epcp->out_state->rxcnt += n;
|
epcp->out_state->rxcnt += n;
|
||||||
epcp->out_state->rxsize -= n;
|
epcp->out_state->rxsize -= n;
|
||||||
epcp->out_state->rxpkts -= 1;
|
epcp->out_state->rxpkts -= 1;
|
||||||
if (epcp->out_state->rxpkts > 0) {
|
|
||||||
/* Transfer not completed, there are more packets to receive.*/
|
/* The transaction is completed if the specified number of packets
|
||||||
EPR_SET_STAT_RX(ep, EPR_STAT_RX_VALID);
|
has been received or the current packet is a short packet.*/
|
||||||
|
if ((n < epcp->out_maxsize) || (epcp->out_state->rxpkts == 0)) {
|
||||||
|
/* Transfer complete, invokes the callback.*/
|
||||||
|
_usb_isr_invoke_out_cb(usbp, ep);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Transfer completed, invokes the callback.*/
|
/* Transfer not complete, there are more packets to receive.*/
|
||||||
_usb_isr_invoke_out_cb(usbp, ep);
|
EPR_SET_STAT_RX(ep, EPR_STAT_RX_VALID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue