The disk_writep function writes data to the sector.
DRESULT disk_writep ( BYTE* Buffer, /* Pointer to the data to be written */ DWORD SectorBytes, /* Sector number or Number of bytes to wtite */ );
The sector write operation is done in following sequence.
If a write operaion is in progress, disk_readp function will fail and disk_initialize function finalize the write operation.
This funciton is not needed in read-only configuration.