Serial_WriteUnbuffered

Synopsis #

Header: fxcg/serial.h
Syscall index: 0x1BBD
Function signature: int Serial_WriteUnbuffered(unsigned char x)

Transmits a single byte over the serial port, without buffering, by putting it on the serial transmit FIFO.

Parameters #

  • x: Byte value to transmit.

Returns #

  • 0 for success,
  • 1 if the hardware FIFO is not empty,
  • 3 if the serial channel is not open.

Comments #

To configure the serial port, use Serial_Open. Serial_Write allows you to queue many bytes for transmission to be sent whenever possible, and Serial_WriteSingle does the same thing as this but with buffering (so it will not fail unless the transmit buffer is full).