Up: GEOS SDK TechDocs | Up | Prev: realloc() ... | Next: SGC_MACHINE ...

SerialGetFormat()

StreamError SerialGetFormat(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        SerialFormat *		format,
        SerialMode *		mode,
        SerialBaud *		baud);

Get the format of a stream to a specified serial port.

SerialGetModem()

StreamError SerialGetModem(
        GeodeHandle 		driver,
        SerialUnit		unit,
        SerialModem *		modem);

Read a modem's hardware flow control bits.

SerialOpen()

StreamError SerialOpen(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        StreamOpenFlags 		flags,
        word 		inBuffSize,
        word		outBuffSize,
        word 		timeout);

This routine opens a stream to the specified serial port. It is passed the following arguments:

driver
The GeodeToken of the serial driver.
unit
The serial port to open.
flags
This specifies whether the call should fail if the port is busy, or wait for a time to see if it will become free.
inBuffSize
The size of the stream buffer used for input from the serial port.
outBuffSize
The size of the stream buffer used for output to the serial port.
timeout
The number of clock ticks to wait for the port to become free. (This argument is ignored if flags is not STREAM_OPEN_TIMEOUT.)

If the routine is successful, it returns zero. If it is unsuccessful, it returns a member of the StreamError enumerated type.

SerialQuery()

StreamError SerialQuery(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        StreamRoles role,
        word *		bytesAvailable);

Find out how much space is available in a serial buffer, or how much data is waiting to be read.

SerialRead()

StreamError SerialRead (
        Handle		driver,
        SerialUnit 		unit,
        StreamBlocker 		blocker,
        word 		buffSize,
        byte *		buffer,
        word *		numBytesRead);

Read data from a serial port and write it to a passed buffer.

SerialReadByte()

StreamError SerialReadByte (
        Handle		driver,
        SerialUnit 		unit,
        StreamBlocker 		blocker,
        byte		*dataByte);

Read a byte of data from a serial port and write it to a passed variable.

SerialSetError()

StreamError SerialSetError (
        Handle 		driver,
        SerialUnit 		unit,
        StreamRoles 		roles,
        SerialError 		errorCode);

This routine sets the serial-driver-specific error code for recovery with SerialGetError() .

SerialSetFlowControl()

StreamError 	SerialSetFlowControl (
        Handle 		driver,
        SerialUnit 		unit,
        SerialFlowControl 		flow,
        SerialModem 		modem,
        SerialModemStatus 		status);

This routine enables or disables software flow control. The flow argument has two flags, SFC_HARDWARE and SFC_SOFTWARE.

SerialSetFormat()

StreamError SerialSetFormat(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        SerialFormat 		format,
        SerialMode		mode,
        SerialBaud 		baud);

Set the format for a stream to a specified serial port.

SerialSetModem()

StreamError SerialSetModem(
        GeodeHandle 		driver,
        SerialUnit		unit,
        SerialModem 		modem);

Set a modem's hardware flow control bits.

SerialWrite()

StreamError SerialWrite(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        StreamBlocker 		blocker,
        word 		buffSize,
        const byte *		buffer,
        word *		numBytesWritten);

Write data to a serial port.

SerialWriteByte()

StreamError SerialWrite(
        GeodeHandle 		driver,
        SerialUnit 		unit,
        StreamBlocker 		blocker,
        word 		buffSize,
        byte		dataByte);

Write one byte of data to a serial port.


Up: GEOS SDK TechDocs | Up | Prev: realloc() ... | Next: SGC_MACHINE ...