OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_49/] [or1ksim/] [peripheral/] [channels/] [tty.c] - Diff between revs 1128 and 1154

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1128 Rev 1154
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);
    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)
                goto error;
                goto error;
 
 
    channel->fds.fdin = channel->fds.fdout = fd;
    channel->fds.fdin = channel->fds.fdout = fd;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.