
TPMC500-SW-42 - VxWorks Device Driver
Page 10 of 19
4 I/O interface functions
This chapter describes the interface to the basic I/O system.
4.1 open()
NAME
open() - opens a device or file.
SYNOPSIS
int open
(
const char *name,
/* name of the device to open
*/
int
flags,
/* not used for TPMC500 driver, must be 0 */
int
mode
/* not used for TPMC500 driver, must be 0 */
)
DESCRIPTION
Before I/O can be performed to the TPMC500 device, a file descriptor must be opened by invoking the
basic I/O function
open().
PARAMETER
The parameter
name
selects the device which shall be opened.
The parameters
flags
and
mode
are not used and must be 0.
EXAMPLE
...
/*-----------------------------------------------------------
Open the device named "/tpmc500" for I/O
-----------------------------------------------------------*/
fd = open("/tpmc500", 0, 0);
...