Page 3 of 3
Re: FatFS, F_Write and integer
Posted: Wed Jan 09, 2013 7:25 pm
by Tectu
In case of you don't have any source for making just single PCB prototypes, let me know, I can make it for you.
~ Tectu
Re: FatFS, F_Write and integer
Posted: Wed Jan 09, 2013 8:57 pm
by Ramazzukk
So, I found something interesting:
http://www.mikrocontroller.net/topic/38903There are two files, numtostr.c , numtostr.h with several functions.
I testet with:
Code: Select all
char fstr[20];
float floatval=0.1234;
ftoa(fstr,floatval,3,4,1);
chprintf((BaseChannel *)&SD2, "; String: %s\r\n", &fstr);
I did a quick float to char cast, worked fine so far. The rest I haven't testet (yet). Of course sprintf would be the nice variant, but I'm not sure if its less memory-consuming. And the chprintf-problem ist solved as well! May it help someone, big thanks goes out to Tectu and Marko B. @
http://www.mikrocontroller.net/topic/38903