Serial Write

From WikiPrizm
Revision as of 06:45, 1 August 2014 by Gbl08ma (talk | contribs) (Created page with "{{syscall | name = Serial_Write | header = fxcg/serial.h | index = 0x1BBE | signature = int Serial_Write(const unsigned char* buf, int count) | synopsis = Sends a number of by...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Synopsis

Header: fxcg/serial.h
Syscall index: 0x1BBE
Function signature: int Serial_Write(const unsigned char* buf, int count)

Sends a number of bytes through the 3-pin serial port, by putting them in the transmit buffer.

Parameters

  • buf - pointer to buffer containing the bytes to transmit;
  • count - amount of bytes to transmit from buf.

Returns

  • 0 if successful,
  • 2 if no space is available in the serial transmit buffer (which has a size of 256 bytes),
  • 3 if the serial channel is not open.