12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Write LineDescriptionThe Write Line command is very similar to the Write command. The difference is that thecommand is terminated when a «cr» is received (or 512 bytes, whichever comes first).You can write up to 512 bytes at a time with the Write Line 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 isreceived raw (i.e. no escape <strong>se</strong>quences are required).The Write Line command will terminate if a «cr» is received, append the appropriate EOL(End Of Line) terminator (depending on the Read/Write Line Terminator <strong>se</strong>tting), and writethe data to the file.By default, there is no time-out for how long it takes to <strong>se</strong>nd the data. This means that theuMMC will wait indefinitely for all the data to be <strong>se</strong>nt.If the value of the Write Time-out <strong>se</strong>tting is greater than 0 (zero), then if the time takenbetween <strong>se</strong>nding bytes exceeds that value (in tens of milli<strong>se</strong>conds), the Write command willterminate, write the accepted bytes to the file, and return to the command prompt. No EOLterminator will be written. No error will be returned.FormatWL fh [num]Parameters• fh is a file handle (1 - 4). U<strong>se</strong> 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 isassumed).Respon<strong>se</strong> FormatNULL | EnnExampleWrite a line of text to a file (Setting “E” = 0 → «cr» as EOL):Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 142

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!