Release v2.11.1

This commit is contained in:
slimih
2022-10-05 11:35:41 +01:00
parent 555ce2b1f7
commit 2022e75b01
17 changed files with 184 additions and 105 deletions

View File

@@ -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)

View File

@@ -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));