TPMC866-SW-42 - VxWorks Device Driver
Page 15 of 37
4.2 close()
NAME
close() – close a device or file
SYNOPSIS
STATUS close
(
int
fd
)
DESCRIPTION
This function closes opened devices.
PARAMETER
fd
This file descriptor specifies the device to be closed. The file descriptor has been returned by
the
open()
function.
EXAMPLE
int
fd;
STATUS
retval;
…
/*----------------
close the device
----------------*/
retval = close(fd);
RETURNS
OK or ERROR. If the function fails, an error code will be stored in
errno
.