Hello and happy new year,
I am using sdfat and Iam working around this function
files.printFileSize(&Serial);
This file print in my terminal the size of the file.
I create a print function
sprintln(char *text, int log){}
when int log is
0 => print in terminel
1 => write in sd card (log file)
2 => both
As I want to write the print in my logfile of my Sd card
files.printFileSize(&Serial);
I would like to use my function sprintln() (or sprint())
Tell me if I am wrong,
if files.printFileSize() rint in terminal, is because ther &Serial as parameter.
But now, how can I adapt it to have it in sprintln(,2)?
Would it be possible to do it
sprintln(files.printFileSize(&Serial),2)
;
or
sprintln(files.printFileSize(&Serial),1)
(1 is to only write in log file of my sd card)
Thank for your advises!
Cheers