FatFS, F_Write and integer

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: FatFS, F_Write and integer

Post 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
Ramazzukk
Posts: 25
Joined: Sun Jan 06, 2013 2:19 pm

Re: FatFS, F_Write and integer

Post by Ramazzukk »

So, I found something interesting:

http://www.mikrocontroller.net/topic/38903

There 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
Post Reply