I was going through the FATFS documentation and I came to know that we cannot print the floating point numbers using fprintf command in FATFS. But I wanted to print the floating values So How can I do that??
Thanks and Regards
For a 'limited range and scope' of 'floating point print' you can 'fake it' with integer operations. Say you have an integer, say in this case one that represents milli-celsius (or a float, with slower math) so we always print exactly three digits after the decimal point:
if( (temp < 0) && ((temp/1000) == 0) )
printf("-"); //For our integer pseudo-float print, a zero-whole won't print '-' for us...
printf(" %i.%03i degrees C\n",temp/1000,abs(temp)%1000);
Personally, I quickly gave up on this trick and opted to 'disable' the 'reduced function' printf from the example code sets and included the full-function compiler version, connecting the 'write' function to my console output.
Retrieving data ...