I am attempting to use sscanf() on nRF51822. However the chip simply freezes when reaching that part of the code. Do I need to add anything in the toolchain to make it work?
I am attempting to use sscanf() on nRF51822. However the chip simply freezes when reaching that part of the code. Do I need to add anything in the toolchain to make it work?
Just tested with this code in the uart project (examples/peripheral/uart) and it worked:
char sentence []="Rudolph is 12 years old";
char str [20];
int i;
sscanf (sentence,"%s %*s %d",str,&i);
printf ("%s -> %d\n",str,i);
//output is: Rudolph -> 12
I was using Keil. Can you give us the sscanf code that does not work?