FYI
/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
int fputc(int ch, FILE *f)
{
while(CDC_Transmit_FS((uint8_t*)(&ch),1)!=USBD_OK){}
return ch;
}
void MyTrainsmit(void)
{
uint32_t bufferLength;
if(USBD_OK == CDC_Receive_FS(UserTxBufferFS,&bufferLength))
{
USART2_DMA_Transmit(UserTxBufferFS,(uint16_t)bufferLength );
}
}
/* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */
|