This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Setting speed of serial port on Win2K system


AuM. Graefe asked about setting speed of serial ports on Win 2000.

I've had success with

#include <termios.h>

....

struct termios *serial_config;

....

	cfsetospeed( serial_config, B57600); // for example
	cfsetispeed( serial_config, B57600);

in conjunction with a later tcsetattr call...

	if( tcsetattr( serial_fd, TCSANOW, serial_config ) ) {
		printf("Error tcsetattr\n");
		exit(1);
	}

I've managed multiple speeds including B115200 and B38400 so its not
just a happy accident.

neal


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]