cancel
Showing results for 
Search instead for 
Did you mean: 

how to use Scanf in Keil uVision5 for STM32F103C8T6

Sprak.11
Associate II

I want to use scanf function for usart with dma please help me for that.

I need to receive a string through scanf but the string size will differ each time .

1 REPLY 1

You'd need to implement retargeting routines to perform the getch() type functionality.

You'd still have to do all the buffering and ownership of the USART+DMA, and it might be more efficient for you to parse the stream and use sscanf(), strtok(), atoi(), atod(), etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..