waxing prolix -- defunct

What today was like

   Wed, December 13, 2006 - 6:39 PM
fd = open("/dev/ttyAM1",O_RDWR);
// Full duplex (don't float TX!)
mcr = AUTO485FD;
ioctl (fd, TIOC_SBCS485, &mcr);
tcgetattr( fd, &my_termios );
// DMX spec is 250000, Hope this works...
my_termios.c_cflag |= B230400;
tcsetattr( fd, TCSANOW, &my_termios );
tcgetattr( fd, &new_termios );
if ( memcmp( &my_termios, &new_termios,
sizeof( my_termios )) != 0 ) {
/* do some error handling */
perror("/dev/ttyAM1");
}







Ugh.


But when it works, it's going to be awesome.



0 Comments

add a comment