disk_write

The disk_write writes sector(s) to the disk.

DRESULT disk_write (
  BYTE Drive,          /* Physical drive number */
  const BYTE* Buffer,  /* Pointer to the read buffer */
  DWORD SectorNumber,  /* Sector number to write */
  BYTE SectorCount     /* Number of sectors to write */
);

Parameters

Drive
Specifies the physical drive number to write.
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 (0)
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