hi
how can i read formatted input from standard input( instead of scanf )what function can i use to read
hi
how can i read formatted input from standard input( instead of scanf )what function can i use to read
You'd first have to decide what is "standard input" ...
yes i want to give the input using termite
The nRF chip knows nothing about termite - or any other terminal app.
All it sees is bytes arriving at its UART (or USB "virtual" UART).
So you will need to collect bytes arriving at the UART (or via USB), parse them, and process them.
Have you looked at the UART example?
infocenter.nordicsemi.com/.../uart_example.html
Or the CLI library?
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_cli.html
so in that case how i can replace the scanf and printf funtion in nordic
so in that case how i can replace the scanf and printf funtion in nordic
Exactly the same as you'd do it on any other microcontroller!
You'd need low-level functions to send a character to the UART, and receive a character from a UART. Those are the only parts that are specific to the particular microcontroller.
Above that, you're just handling characters & strings.
The general term is "retargetting" (or "retargeting")
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__retarget.html
https://www.keil.com/pack/doc/compiler/RetargetIO/html/index.html
http://robotics.mcmanis.com/articles/20140623_retargeting-libc.html