Random Write (0x0021)

Performs write I/0 to any part of the media in a device.

Parameters

function
0x0021 – write request.
parameter0
Specifies the number of units to be written.
parameter1
Specifies the logical unit number of the beginning unit.
parameter2
Not used.
bufferLength
The size of the buffer (the number of units multiplied by the unit size) in bytes, or the number of elements in the scatter/gather buffer.
buffer
Points to a buffer in memory where the data is written from or it points to a scatter/gather list of buffers (see Scatter/Gather List ).