TPMC866-SW-42 - VxWorks Device Driver
Page 33 of 37
4.5.10 FIOCHECKBREAK
This I/O control function checks if a break has been received since device creation, reconfiguration or
the last
FIOCHECKBREAK
call for the specific channel.
The function specific control parameter
arg
passes as pointer to a
char
value to the device driver,
where the result will be returned. A result of TRUE means that a break has been received. A result of
FALSE says that no break has been received. The input break condition will be deleted with this call.
EXAMPLE
#include
"tpmc866.h”
int
fd;
int
result;
char
break_rcv;
…
/*-----------------------------------------------------------
Check the break flag
-----------------------------------------------------------*/
result = ioctl (fd, FIOCHECKBREAK, &break_rcv);
if (result == OK)
{
/* Success */
if (break_rcv)
{
printf(“BREAK received.\n”);
}
}
else
{
/* Function failed */
}