TIP810-SW-42 - VxWorks Device Driver
Page 14 of 36
EXAMPLE
int
fd;
/*------------------------------------------
Open the device named "/t810A" for I/O
------------------------------------------*/
fd = open("/t810A", 0, 0);
if (fd == ERROR)
{
/* error handling */
}
RETURNS
A device descriptor number or ERROR. If the function fails an error code will be stored in
errno
.
ERROR CODES
The error code can be read with the function
errnoGet()
.
The error code is a standard error code set by the I/O system (see VxWorks Reference Manual).
SEE ALSO
ioLib, basic I/O routine -
open()