AnsweredAssumed Answered

CDC_Transmit_FS () with you stm32cube (LAST VERSION)

Question asked by marco on Mar 22, 2016
Are you kidding?

What sense has this function made in this way ?

uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)
{
  uint8_t result = USBD_OK;
  /* USER CODE BEGIN 7 */ 
  USBD_CDC_SetTxBuffer(hUsbDevice_0, Buf, Len);     
  while(result != USBD_OK);                                              <<<<<<<<<<<< i think useless
  do {
    result = USBD_CDC_TransmitPacket(hUsbDevice_0);
  }
  while(result != USBD_OK);
  /* USER CODE END 7 */ 
  return result;                                                <<<<<<<<<<< wath else can i return with  >>while(result != USBD_OK);<<
}

Outcomes