escsw-coocox/cdc/src/usbd_cdc_vcp.c
static uint16_t VCP_DataTx(uint8_t* Buf, uint32_t Len) {
	uint32_t i = 0;
	while (i < Len) {
		APP_Rx_Buffer[APP_Rx_ptr_in] = *(Buf + i);
		APP_Rx_ptr_in++;
		i++;
		/* To avoid buffer overflow */
		if (APP_Rx_ptr_in == APP_RX_DATA_SIZE) {
			APP_Rx_ptr_in = 0;
		}
	}

	return USBD_OK;
}
/**
 * @brief  VCP_DataTx
 *         CDC received data to be send over USB IN endpoint are managed in
 *         this function.
 * @param  Buf: Buffer of data to be sent
 * @param  Len: Number of data to be sent (in bytes)
 * @retval Result of the opeartion: USBD_OK if all operations are OK else VCP_FAIL
 */
@brief  VCP_DataTx
CDC received data to be send over USB IN endpoint are managed in
this function.
@param  Buf: Buffer of data to be sent
@param  Len: Number of data to be sent (in bytes)
@retval Result of the opeartion: USBD_OK if all operations are OK else VCP_FAIL
@brief VCP_DataTx CDC received data to be send over USB IN endpoint are managed in this function . @param Buf : Buffer of data to be sent @param Len : Number of data to be sent ( in bytes ) @retval Result of the opeartion : USBD_OK if all operations are OK else VCP_FAIL
static uint16_t VCP_DataTx(uint8_t* Buf, uint32_t Len) {
	uint32_t i = 0;
	while (i < Len) {
		APP_Rx_Buffer[APP_Rx_ptr_in] = *(Buf + i);
		APP_Rx_ptr_in++;
		i++;
		if (APP_Rx_ptr_in == APP_RX_DATA_SIZE) {
			APP_Rx_ptr_in = 0;
		}
	}
	return USBD_OK;
}
static uint16_t VCP_DataTx ( uint8_t * Buf , uint32_t Len ) { uint32_t i = 0 ; while ( i < Len ) { APP_Rx_Buffer [ APP_Rx_ptr_in ] = * ( Buf + i ) ; APP_Rx_ptr_in ++ ; i ++ ; if ( APP_Rx_ptr_in == APP_RX_DATA_SIZE ) { APP_Rx_ptr_in = 0 ; } } return USBD_OK ; }
@brief  VCP_DataTx
         CDC received data to be send over USB IN endpoint are managed in
         this function.
@brief VCP_DataTx CDC received data to be send over USB IN endpoint are managed in this function .
/* To avoid buffer overflow */