Serial WriteUnbuffered

From WikiPrizm
Revision as of 21:38, 23 May 2012 by Tari (talk | contribs) (Created page with "{{syscall | name = Serial_WriteUnbuffered | index = 0x1BBD | header = fxcg/serial.h | signature = int Serial_WriteUnbuffered(unsigned char c) | synopsis = Transmits a single b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Synopsis

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

Transmits a single byte over the serial port, without buffering.

Parameters

  • c: Byte value to transmit.

Returns

0 for success, nonzero for failure. 1 if the hardware FIFO is not empty, and 3 if the serial port 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).