USB v4.1.1 Virtual COM printf

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB v4.1.1 Virtual COM printf

528 Views
Mike_d
Contributor IV

Is there a way I can setup the CDC Virtual COM as the printf output?

0 Kudos
3 Replies

345 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

I'd highly recommend you to use the USB_Class_CDC_Interface_DIC_Send_Data() function drirectly, as it's a little complicated to package the USB_Class_CDC_Interface_DIC_Send_Data() function into the printf() function.

Hope it helps.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

345 Views
Mike_d
Contributor IV

I borrowed the ConsoleIO code from Processor Expert, set stout to unbuffered and replaced the UART code with USB_Class_CDC_Interface_DIC_Send_Data(). So far I have the __write_console function working.  Do you see any problems doing the same with USB_Class_CDC_Interface_DIC_Recv_Data() for the  __read_console function?

0 Kudos

345 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Michael,

Before answer your question, I was wondering if you can share your code at first.

I'm looking forward to your reply.

Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos