Write File

\i S W byte::handle word::count byte::b0 ...

Parameter Type Range Description
handle byte 0 ... 3 unique identifier for opened file
count word 0 ... 65535 number of bytes to write
b0 ... bytes 0x00 ... 0xFF data bytes to be written

Writes count bytes to a previously opened file starting at the current file position.

Note

Response: [ACK]

Example

\iSO\1Wtext.txt\0
\iSW\1\D12Hello\sWorld!\r
\iSO\2Wbinary.bin\0
\iSW\2\D5\x1\x2\x3\x4\x5

This example writes "Hello World!" followed by a line break to the file "text.txt" and ascending hex values 1 through 5 to the file "binary.bin". Both files are located in the root folder of the SD card.

Not supported by: DPC3050, DPC3020, DPC2060, DPC10xx

See also:

MicroSD Card Related Commands
Open File
Read File
Tell Position in File
Set Position in File
Get File Status