KugleFirmware/Libraries/Periphirals/USBCDC/usbd_cdc_if.c
/**
  * @brief  CDC_Transmit_FS
  *         Data send over USB IN endpoint are sent over CDC interface
  *         through this function.
  *         @note
  *
  *
  * @param  Buf: Buffer of data to be send
  * @param  Len: Number of data to be send (in bytes)
  * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
  */
@brief  CDC_Transmit_FS
Data send over USB IN endpoint are sent over CDC interface
through this function.
@note

@param  Buf: Buffer of data to be send
@param  Len: Number of data to be send (in bytes)
@retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
@brief CDC_Transmit_FS Data send over USB IN endpoint are sent over CDC interface through this function . @note @param Buf : Buffer of data to be send @param Len : Number of data to be send ( in bytes ) @retval Result of the operation : USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)
{
  uint8_t result = USBD_OK;
  USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS->pClassData;
  if (hcdc->TxState != 0){
    return USBD_BUSY;
  }
  USBD_CDC_SetTxBuffer(hUsbDeviceFS, Buf, Len);
  result = USBD_CDC_TransmitPacket(hUsbDeviceFS);
  return result;
}
uint8_t CDC_Transmit_FS ( uint8_t * Buf , uint16_t Len ) { uint8_t result = USBD_OK ; USBD_CDC_HandleTypeDef * hcdc = ( USBD_CDC_HandleTypeDef * ) hUsbDeviceFS -> pClassData ; if ( hcdc -> TxState != 0 ) { return USBD_BUSY ; } USBD_CDC_SetTxBuffer ( hUsbDeviceFS , Buf , Len ) ; result = USBD_CDC_TransmitPacket ( hUsbDeviceFS ) ; return result ; }
@brief  CDC_Transmit_FS
         Data send over USB IN endpoint are sent over CDC interface
         through this function.
@brief CDC_Transmit_FS Data send over USB IN endpoint are sent over CDC interface through this function .
/* USER CODE BEGIN 7 */ /* USER CODE END 7 */