assert a break condition over a communications line
#include <termios.h> int tcsendbreak( int fildes, int duration );
The tcsendbreak() function asserts a break condition over the communication line associated with the opened file descriptor indicated by fildes.
The break condition will be approximately 300 milliseconds if duration is zero, otherwise the break condition will last for at least duration milliseconds. The system rounds the effective value of duration up to the next highest supported interval, which is typically a multiple of 100 milliseconds.
#include <termios.h> #include <fcntl.h> #include <unistd.h> void main() { int fd; fd = open( "/dev/ser1", O_RDWR ); /* * Send a 500 millisecond break */ tcsendbreak( fd, 500 ); close( fd ); }
POSIX 1003.1
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
errno, tcdrain(), tcdropline(), tcflow(), tcflush()