| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-Id: | <5.1.1.6.2.20040614102441.00af8ad0@mail.actron.com> |
| X-Sender: | nsomos AT mail DOT actron DOT com |
| Date: | Mon, 14 Jun 2004 10:35:30 -0400 |
| To: | cygwin AT cygwin DOT com |
| From: | Neil Somos <nsomos AT actron DOT com> |
| Subject: | Setting speed of serial port on Win2K system |
| Cc: | graefe DOT m AT ritto DOT de |
| Mime-Version: | 1.0 |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |