Serial Read

From WikiPrizm
Revision as of 12:23, 18 May 2012 by Tari (talk | contribs)
Jump to navigationJump to search


Header: fxcg/serial.h
Syscall index: 0x1BBA
Function signature: int Serial_Read(unsigned char *out, int sz, short *count)

Reads bytes from the serial receive buffer.


  • out: Buffer to write received data to.
  • sz: Maximum number of bytes to read.
  • count: Output parameter receiving the number of bytes actually read.


0 if successful, 1 if the receive buffer is empty, and 3 if the serial channel is not open. If successful, the actual number of bytes read is returned in count.


The receive buffer can hold up to 1024 bytes. Its behavior on overflow is unknown.

Originally documented as Serial_ReadNBytes.