mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-08 20:18:07 -05:00
Release v2.11.1
This commit is contained in:
@@ -640,7 +640,8 @@ static uint8_t USBD_VIDEO_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
|
||||
static uint16_t PcktSze = UVC_PACKET_SIZE;
|
||||
static uint8_t payload_header[2] = {0x02U, 0x00U};
|
||||
uint8_t i = 0U;
|
||||
uint32_t RemainData, DataOffset = 0U;
|
||||
uint32_t RemainData = 0U;
|
||||
uint32_t DataOffset = 0U;
|
||||
|
||||
/* Check if the Streaming has already been started */
|
||||
if (hVIDEO->uvc_state == UVC_PLAY_STATUS_STREAMING)
|
||||
|
||||
@@ -234,14 +234,16 @@ static int8_t VIDEO_Itf_Data(uint8_t **pbuf, uint16_t *psize, uint16_t *pcktidx)
|
||||
*psize = (uint16_t)UVC_PACKET_SIZE;
|
||||
|
||||
/* Get the pointer to the next packet to be transmitted */
|
||||
*pbuf = (uint8_t *)(*(ImagePtr + img_count) + (packet_index * ((uint16_t)(UVC_PACKET_SIZE - (UVC_HEADER_PACKET_CNT * 2U)))));
|
||||
*pbuf = (uint8_t *)(*(ImagePtr + img_count) + \
|
||||
(packet_index * ((uint16_t)(UVC_PACKET_SIZE - (UVC_HEADER_PACKET_CNT * 2U)))));
|
||||
}
|
||||
else if ((packet_index == packet_count))
|
||||
{
|
||||
if (packet_remainder != 0U)
|
||||
{
|
||||
/* Get the pointer to the next packet to be transmitted */
|
||||
*pbuf = (uint8_t *)(*(ImagePtr + img_count) + (packet_index * ((uint16_t)(UVC_PACKET_SIZE - (UVC_HEADER_PACKET_CNT * 2U)))));
|
||||
*pbuf = (uint8_t *)(*(ImagePtr + img_count) + \
|
||||
(packet_index * ((uint16_t)(UVC_PACKET_SIZE - (UVC_HEADER_PACKET_CNT * 2U)))));
|
||||
|
||||
/* Set the current packet size */
|
||||
*psize = (uint16_t)(packet_remainder + (UVC_HEADER_PACKET_CNT * 2U));
|
||||
|
||||
Reference in New Issue
Block a user