2022-06-27 02:47 AM
2022-06-27 03:18 AM
The underlying capacity via GET CAPACITY type query, for file system you'd have to navigate the structure and find free space. FATFS provided for a method to get used/free space.
2022-06-27 03:26 AM
Is there an example? In the libraries in my code I have found USBH_MSC_SCSI_ReadCapacity(), but I didn't managed to make it work.
I initialized USB with MX_USB_HOST_Init() and in the while(1) loop I use MX_USB_HOST_Process(). But I see that in the libraries the function USBH_MSC_SCSI_ReadCapacity() is called inside USBH_StatusTypeDef USBH_MSC_Process(USBH_HandleTypeDef *phost)
2022-06-27 08:19 AM
@VCapu "Is there an example?"
what filesystem are you using?
Have you looked in its documentation?
eg, FatFs documentation is here: http://elm-chan.org/fsw/ff/00index_e.html - you can see there's a function to "Get free space on the volume" ...