/* MTP_build_data_ObjInfo Copy the MTP_ObjectInfo dataset to the payload data.  */
static uint32_t MTP_build_data_ObjInfo(USBD_HandleTypeDef *pdev, MTP_ObjectInfoTypeDef objinfo)
/* MTP_build_data_ObjInfo Copy the MTP_ObjectInfo dataset to the payload data.  */
static uint32_t MTP_build_data_ObjInfo(USBD_HandleTypeDef *pdev, MTP_ObjectInfoTypeDef objinfo)
{
  USBD_MTP_HandleTypeDef *hmtp = (USBD_MTP_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
  uint32_t ObjInfo_len = offsetof(MTP_ObjectInfoTypeDef, Filename);
  (void)USBD_memcpy(hmtp->GenericContainer.data, (const uint8_t *)&objinfo, ObjInfo_len);
  (void)USBD_memcpy(hmtp->GenericContainer.data + ObjInfo_len,
                    (const uint8_t *)&objinfo.Filename, objinfo.Filename_len * sizeof(uint16_t));
  ObjInfo_len = ObjInfo_len + (objinfo.Filename_len * sizeof(uint16_t));
  (void)USBD_memcpy(hmtp->GenericContainer.data + ObjInfo_len,
                    (const uint8_t *)&objinfo.CaptureDate, sizeof(objinfo.CaptureDate));
  ObjInfo_len = ObjInfo_len + sizeof(objinfo.CaptureDate);
  return ObjInfo_len;
}