Hi ,
I am using nrf connect sdk , nrf 5340 dk board and segger studio. scanf is not working. please let me know how to use scanf for nrf5340 dk . can you provide me any example code for better understanding .
Regards,
Srinivas Rao.
Hi ,
I am using nrf connect sdk , nrf 5340 dk board and segger studio. scanf is not working. please let me know how to use scanf for nrf5340 dk . can you provide me any example code for better understanding .
Regards,
Srinivas Rao.
Hi,
Try adding these configurations to any project, and start using sscanf() freely:
CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y CONFIG_MAIN_STACK_SIZE=4096
But please be aware that the sscanf() implementation in newlib does not support 8 bit IO types, as described in this thread:
https://devzone.nordicsemi.com/f/nordic-q-a/72455/nrf9160---sscanf---length-field-hhi-hhu
Kind regards,
Håkon
Hi,
Try adding these configurations to any project, and start using sscanf() freely:
CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y CONFIG_NEWLIB_LIBC_FLOAT_SCANF=y CONFIG_MAIN_STACK_SIZE=4096
But please be aware that the sscanf() implementation in newlib does not support 8 bit IO types, as described in this thread:
https://devzone.nordicsemi.com/f/nordic-q-a/72455/nrf9160---sscanf---length-field-hhi-hhu
Kind regards,
Håkon
Hi ,
we can't read data from the console using sscanf . we can read data from one buffer to another buffer. Actually, I will enter commands on the console. so, I need to read the commands from the console .
Thanks & Regards,
Srinivas.
Hi,
You can get data from the uart console by adding "CONFIG_CONSOLE_HANDLER=y".
Here's hello world with this feature:
Kind regards,
Håkon