
USING LINUX WITH H5 DEVICES
78
MultiConnect
®
PCIe MTPCIE-H5/MTPCIE-BW Developer Guide
Parameters:
fildes – file descriptor
buf – destination buffer pointer
nbyte – number of bytes that write() attempts to write
Returns
:
The number of bytes actually written if the operation is completed successfully, otherwise it is -1.
Example
Write
strlen(value_to_be_written)
bytes from the buffer pointed by
value_to_be_written
to the file
associated with the open file descriptor,
fd
.
char value_to_be_written[] = “dummy_write”;
if (write(fd, value_to_be_written, strlen(value_to_be_written)) < 0)
{
/* Error Management Routine */
} else {
/* Value Written */
}
close()
The
close()
function shall deallocate the file descriptor indicated by
fildes
. To deallocate means to make the file
descriptor available for return by subsequent calls to
open()
or other functions that allocate file descriptors.
Header File
unistd.h
Prototype:
int close(int fildes);
Parameters:
fildes - file descriptor
Returns
:
0 if successful, otherwise it is -1.
Example
Close the ttyACMx file.
if(close(fd) < 0)
{
/* Error Management Routine */
} else {
/* File Closed */
}
Summary of Contents for MultiConnect MTPCIE-BW
Page 1: ...MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 20: ...DEVELOPER BOARD AND SCHEMATICS 20 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 22: ...DEVELOPER BOARD AND SCHEMATICS 22 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide Bottom...
Page 25: ...DEVELOPER BOARD AND SCHEMATICS MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide 25...
Page 26: ...DEVELOPER BOARD AND SCHEMATICS 26 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 27: ...DEVELOPER BOARD AND SCHEMATICS MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide 27...
Page 28: ...DEVELOPER BOARD AND SCHEMATICS 28 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 29: ...DEVELOPER BOARD AND SCHEMATICS MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide 29...
Page 30: ...DEVELOPER BOARD AND SCHEMATICS 30 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 31: ...DEVELOPER BOARD AND SCHEMATICS MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide 31...
Page 32: ...DEVELOPER BOARD AND SCHEMATICS 32 MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide...
Page 51: ...MECHANICAL DRAWING MultiConnect PCIe MTPCIE H5 MTPCIE BW Developer Guide 51 MTPCIE BW...