FreeRtos +FAT Native API

jcbarbero wrote on Tuesday, May 30, 2017:

Hi everyone, I´m new in the FreeRTOS environment and I´m trying to work with the SDCard as a log space, I´ve succesfully read and written the logs but I haven´t found an api for check the space left on the SD, in other words, the space available in the SDCard.
I´m using the FreeRtos +FAT Native API.

Does anyone know how can I do it?

Thanks in advance.

heinbali01 wrote on Wednesday, May 31, 2017:

Hola Juan Carlos,

When you mount a disk partition, you create a FF_Disk_t. That object has an I/O manager, which you can find with:

    FF_IOManager_t *sddisk_ioman( FF_Disk_t *pxDisk );

Please use the following:

    FF_IOManager_t *pxManager = sddisk_ioman( pxDisk );
	/* The following will give an indication of the free disk space: */

have a look at include/ff_ioman.h for all details.


jcbarbero wrote on Thursday, June 01, 2017:

Thanks you very much, I will try it.


Juan Carlos.