Using Streams: 2.3 Using the Serial Ports: Closing a Serial Port

Up: GEOS SDK TechDocs | Up | Prev: 2.2 Communicating | Next: 3 Using the Parallel Ports
SerialClose(), SerialCloseWithoutReset()

To close a serial port, call the routine SerialClose() . This routine is passed three arguments:

This function returns immediately whether the port was closed right away or not. However, if STREAM_LINGER is specified, the port may not be re-opened until all the data in the Serial Port's buffer has been dealt with.

You can also instruct the serial driver to close the stream to a port, without actually resetting the port. Do this by calling SerialCloseWithoutReset() . This routine is passed the same arguments as SerialClose() .


Up: GEOS SDK TechDocs | Up | Prev: 2.2 Communicating | Next: 3 Using the Parallel Ports