The f_gets reads a string from the file.
char* f_gets ( char* Str, /* Read buffer */ int Size, /* Size of the read buffer */ FIL* FileObject /* File object */ );
When the function succeeded, Str will be returuned.
The f_gets() is a wrapper function of f_read(). The read operation continues until a '\n' is stored, reached end of file or buffer is filled with Size - 1 characters. The read string is terminated with a '\0'. When the file has reached end of the file or any error occured during read operation, f_gets() returns a NULL. The EOF and error status can be examined with f_eof() and f_error() macro.
Available when _USE_STRFUNC is 1 or 2. When it is set to 2, '\r's contained in the file are stripped out.