URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1154 |
Rev 1222 |
Line 128... |
Line 128... |
// Set the serial baud rate
|
// Set the serial baud rate
|
cfsetispeed(&options, baud);
|
cfsetispeed(&options, baud);
|
cfsetospeed(&options, baud);
|
cfsetospeed(&options, baud);
|
|
|
// Enable the receiver and set local mode...
|
// Enable the receiver and set local mode...
|
cfmakeraw(&options);
|
|
|
/* cfmakeraw(&options);
|
|
*
|
|
* cygwin lacks cfmakeraw(), just do it explicitly
|
|
*/
|
|
options.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|
|
|INLCR|IGNCR|ICRNL|IXON);
|
|
options.c_oflag &= ~OPOST;
|
|
options.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
|
|
options.c_cflag &= ~(CSIZE|PARENB);
|
|
options.c_cflag |= CS8;
|
|
|
options.c_cflag |= (CLOCAL | CREAD);
|
options.c_cflag |= (CLOCAL | CREAD);
|
|
|
|
|
// Set the new options for the port...
|
// Set the new options for the port...
|
if (tcsetattr(fd, TCSANOW, &options) < 0)
|
if (tcsetattr(fd, TCSANOW, &options) < 0)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.