Re: SDHC disk doesn't unmount #spi #driver


Leandro Pereira
 

Lucas,

On 4/15/19 5:32 AM, Lucas Peixoto wrote:
So really, we don't have the function pointer to unmount and no one code
related to unmount in fat_fs.c. This is really right? If someone is
using sdhc disk and could help me, I appreciate it.
You're right, the unmount operation isn't implemented in the FAT
fs_file_system_t struct. It should be possible to implement it easily,
though.

Something along the lines of:

static int fatfs_unmount(struct fs_mount_t *mountp)
{
RESULT res;

res = f_mount(NULL, &mountp->mnt_point[1], 1);

return translate_error(res);
}

Should work fine, from a cursory read of the FAT filesystem driver. A
PR adding this to Zephyr would be appreciated.

Cheers,
Leandro

Join users@lists.zephyrproject.org to automatically receive all group messages.