Difference between revisions of "Serial WriteUnbuffered"

From WikiPrizm
Jump to navigationJump to search
 
Line 3: Line 3:
 
| index = 0x1BBD
 
| index = 0x1BBD
 
| header = fxcg/serial.h
 
| header = fxcg/serial.h
| signature = int Serial_WriteUnbuffered(unsigned char c)
+
| signature = int Serial_WriteUnbuffered(unsigned char x)
| synopsis = Transmits a single byte over the serial port, without buffering.
+
| synopsis = Transmits a single byte over the serial port, without buffering, by putting it on the serial transmit FIFO.
 
| parameters =  
 
| parameters =  
* '''c''': Byte value to transmit.
+
* '''x''': 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.
+
| returns = * 0 for success,
 +
* 1 if the hardware FIFO is not empty,
 +
* 3 if the serial channel is not [[Serial_Open|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).
 
| 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).
 
}}
 
}}
 
[[Category:Syscalls:Serial]]
 
[[Category:Syscalls:Serial]]

Latest revision as of 06:50, 1 August 2014


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).