drivers: udc_stm32: handle ZLP flag
A function, such as CDC ECM, can set the ZLP flag to handle a class-specific protocol. This is not to be confused with the ZLP role in control transfers. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
de728c393b
commit
6aaad0a5cd
1 changed files with 7 additions and 0 deletions
|
@ -322,6 +322,13 @@ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
|
|||
return;
|
||||
}
|
||||
|
||||
if (udc_ep_buf_has_zlp(buf) && ep != USB_CONTROL_EP_IN) {
|
||||
udc_ep_buf_clear_zlp(buf);
|
||||
HAL_PCD_EP_Transmit(&priv->pcd, ep, buf->data, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
udc_buf_get(dev, ep);
|
||||
|
||||
if (ep == USB_CONTROL_EP_IN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue