cancel
Showing results for 
Search instead for 
Did you mean: 

Use Printf for USB

gafsos
Associate II
Posted on July 20, 2012 at 15:02

Hello, I need an example on STM32 of how  to use printf to format and output data via USB

CDC communication (VCP demo) .

Does any one had do it before ?

Thanks
2 REPLIES 2
Posted on July 20, 2012 at 16:39

If you are managing the buffers try using sprintf().

Keil has a simple method of retargeting the standard output, but it operates at a character level which is woefully inefficient.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on July 21, 2012 at 00:12

''I need an example on STM32 of how  to use printf to format and output data via USB''

 

Your toolset documentation will tell you how to provide support for printf to output to arbitrary devices - printf neither knows nor cares what the physical interface is.