Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. /**
  2.   * @brief  CDC_Transmit_FS
  3.   *         Data send over USB IN endpoint are sent over CDC interface
  4.   *         through this function.          
  5.   *         @note
  6.   *        
  7.   *                
  8.   * @param  Buf: Buffer of data to be send
  9.   * @param  Len: Number of data to be send (in bytes)
  10.   * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
  11.   */
  12. uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)
  13. {
  14.   uint8_t result = USBD_OK;
  15.   /* USER CODE BEGIN 8 */
  16.   USBD_CDC_SetTxBuffer(hUsbDevice_0, UserTxBufferFS, Len);  
  17.   result = USBD_CDC_TransmitPacket(hUsbDevice_0);
  18.   /* USER CODE END 8 */
  19.   return result;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement