USB v4.1.1 Virtual COM printf

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB v4.1.1 Virtual COM printf

1,227件の閲覧回数
Mike_d
Contributor IV

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

0 件の賞賛
返信
3 返答(返信)

1,044件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

1,044件の閲覧回数
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 件の賞賛
返信

1,044件の閲覧回数
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 件の賞賛
返信