I'm using LPCXpresso v8.2.2_650 to create application for LPC1768.
In my code I use sscanf to fill an unsigned char variable:
unsigned char u8arr[5];
sscanf(str, "%hhu", &u8arr[1]);
when executed the instruction above fill also u8arr[2].
Is there a bug in sscanf function?
Thank you in advance for reply
I'm afraid that Redlib only supports the C90 scanf family specifiers - (none), h, l and L - and not the additional ones added in the C99 standard.
I haven't tested this, but I think that you should be able to use Newlib / NewlibNano instead if you need access to scanf functions that allow the use of the C99 specifiers:
Switching the selected C library
Regards,
LPCXpresso Support
Thank you,
I will try Newlib alternative
Giovanni Friolo
DAB PUMPS S.P.A.
Electronic Designer
Via Bonanno Pisano, 1
giovanni.friolo@dwtgroup.com<mailto:giovanni.friolo@dwtgroup.com>
56031 Bientina (Pisa)
+39 0587 753 840
Italy