open()
Prototype
Parameters
Return Values
close()
Prototype
Parameters
Return Values
This claims ownership of the device. Calling this function also flushes all data and
clears all error conditions in the communication channel. The device names that
can be opened for ports are:
"/DEV/COM1A"
"/DEV/COM1B"
"/DEV/COM1C"
"/DEV/COM1D"
"/DEV/COM1E"
Use get_port_status() to get the status of the smart device connection. A
smart device cannot open a communication port until the e355 application has
opened the corresponding device.
Int open(const char *devname, int attributes);
devname
Pointer to the null terminated device name string.
attributes
Ignored in this driver.
Positive integer device handle if successful, or -1 with errno set to an error code
if error occurs.
This releases ownership of the device. Calling this function also flushes all data
and clears all error conditions in the communication port.
int close(int device_handle) parameters:
device_handle
The handle returned for the device by the open() call.
Returns 0 for success, -1 with errno set to EBADF if device not open.
355/
265 U
B
P
E
E
SER AND
EST
A
RCHITECTURE
open()
19
G
RACTICES
UIDE