Write

Description

You can write up to 512 bytes at a time with the Write command. If num is omitted, then 512 bytes will be expected.

After the command is received, num (or 512) bytes are expected to be received. Data is received raw (i.e. no escape sequences are required).

By default, there is no time-out for how long it takes to send the data. This means that the uMMC will wait indefinitely for all the data to be sent.

If the value of the Write Time-out setting is greater than 0 (zero), then if the time taken between sending bytes exceeds that value (in tens of milliseconds), the Write command will terminate, write the accepted bytes to the file, and return to the command prompt. No error will be returned.

Format

W fh [num]

Parameters

  • fh is a file handle (1 - 4). Use the Free Handle command to get a free file handle.
  • num is the number of bytes to write to the file (1 → 512). Optional (if not given, 512 is assumed).

Response Format

NULLSuccess
EnnAn error occurred

Example

I 1
0/0
W 1 18
13:22:02 ADC1=4.9V
I 1
18/18