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

Subversion Repositories or1k

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

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

Rev 1127 Rev 1128
Line 21... Line 21...
 
 
#include <stdio.h>
#include <stdio.h>
#include <termios.h>
#include <termios.h>
#include <unistd.h>
#include <unistd.h>
#include <string.h>
#include <string.h>
 
#include <fcntl.h>
 
 
#include "channel.h"
#include "channel.h"
#include "generic.h"
#include "generic.h"
#include "fd.h"
#include "fd.h"
 
 
Line 114... Line 115...
                        fprintf(stderr, "error: unknown tty channel parameter \"%s\"\n", param_name);
                        fprintf(stderr, "error: unknown tty channel parameter \"%s\"\n", param_name);
                        goto error;
                        goto error;
                }
                }
        }
        }
 
 
        fd = open(device);
        fd = open(device, O_RDWR);
        if (fd < 0)
        if (fd < 0)
                goto error;
                goto error;
 
 
    // Get the current options for the port...
    // Get the current options for the port...
    if (tcgetattr(fd, &options) < 0)
    if (tcgetattr(fd, &options) < 0)

powered by: WebSVN 2.1.0

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