How to read/write on SD card?

Hi,

I connected a micro SD card through SDIO FIM0 to connect core 9p 9215.
I initialized it sucssesfully. I would like to use fread and fwrite functions to read and write on SD card.
Can any one help me with that?
I also want to know is there any way that I can change pins assigned to SDIO FIM0? For example changing write protect from pin 100 to another pin?
I am using Net+Os 7.5.

Thanks,

does this example:
etos75\src\examples
afatfs\ work for you?

Thank you for your response,
I did try it but seems doesn’t work. Its pre-configured for different platform that 9p-9215!
Also I couldn’t find anywhere to change pin assignment for SDIO. As in my application some of SDIO (FIM0) pins are already in use with other I2C devices.

The FIM pins are not really flexible. you have to look in to NS9215 (processor) HRM GPIO chapter and see what options you have as far as moving IOP/FIM pins around and the reconfigure gpio.h if at all possible