disk_write

The disk_write writes sector(s) to the disk.

DRESULT disk_write (
  const BYTE* Buffer,  // Pointer to the data to be written.
  DWORD SectorNumber,  // Sector number to write.
  BYTE SectorCount     // Number of sectors to write.
);

Parameters

Buffer
Pointer to the data to be written.
SectorNumber
Specifies the start sector number in logical block address.
SectorCount
Specifies number of sectors to write. The value can be 1 to 255.

Return Values

RES_OK
The function succeeded.
RES_ERROR
Any error occured during the write operation.
RES_WRPRT
The disk is write protected.
RES_PARERR
Invalid parameter.
RES_NOTRDY
The disk dirve has not been initialized.

Description

This function is not required in read only configuration.

Return