Release v2.11.5

This commit is contained in:
Ali Labbene
2025-11-25 11:46:41 +01:00
parent d6e6bd2c66
commit 947131e000
20 changed files with 295 additions and 176 deletions

View File

@@ -152,11 +152,19 @@ uint8_t USBD_MTP_STORAGE_ReadData(USBD_HandleTypeDef *pdev)
/* Start USB data transmission to the host */
(void)USBD_MTP_STORAGE_SendData(pdev, (uint8_t *)data_buff, MIN(MTP_DataLength.readbytes, buffer_size));
/* Move to response phase */
hmtp->MTP_ResponsePhase = MTP_RESPONSE_PHASE;
if (((MTP_DataLength.totallen + MTP_CONT_HEADER_SIZE) % hmtp->MaxPcktLen) == 0U)
{
/* Send ZLP Packet */
ReadDataStatus = READ_SEND_ZLP_DATA;
}
else
{
/* Move to response phase */
hmtp->MTP_ResponsePhase = MTP_RESPONSE_PHASE;
/* Reset the state machine */
ReadDataStatus = READ_FIRST_DATA;
/* Reset the state machine */
ReadDataStatus = READ_FIRST_DATA;
}
}
else
{
@@ -168,6 +176,19 @@ uint8_t USBD_MTP_STORAGE_ReadData(USBD_HandleTypeDef *pdev)
}
break;
case READ_SEND_ZLP_DATA:
/* Send ZLP to the host */
(void)USBD_MTP_STORAGE_SendData(pdev, (uint8_t *)data_buff, 0U);
/* Move to response phase */
hmtp->MTP_ResponsePhase = MTP_RESPONSE_PHASE;
/* Reset the state machine */
ReadDataStatus = READ_FIRST_DATA;
break;
default:
break;
}