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

Subversion Repositories or1k_old

[/] [or1k_old/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [peripheral/] [channels/] [tty.c] - Diff between revs 1308 and 1557

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

Rev 1308 Rev 1557
Line 73... Line 73...
        return B0;
        return B0;
}
}
 
 
static void * tty_init(const char * input)
static void * tty_init(const char * input)
{
{
        int fd, baud;
        int fd = 0, baud;
        char *param_name, *param_value, *device;
        char *param_name, *param_value, *device;
    struct termios options;
    struct termios options;
    struct tty_channel* channel;
    struct tty_channel* channel;
 
 
        channel = (struct tty_channel*)malloc(sizeof(struct tty_channel));
        channel = (struct tty_channel*)malloc(sizeof(struct tty_channel));
Line 166... Line 166...
static int tty_open(void * data)
static int tty_open(void * data)
{
{
    return 0;
    return 0;
}
}
 
 
static int tty_read(void * data, char * buffer, int size)
 
{
 
    return fd_read(data, buffer, size);
 
}
 
 
 
static int tty_write(void * data, const char * buffer, int size)
 
{
 
    return fd_write(data, buffer, size);
 
}
 
 
 
struct channel_ops tty_channel_ops =
struct channel_ops tty_channel_ops =
{
{
    init:   tty_init,
    init:   tty_init,
    open:   tty_open,
    open:   tty_open,
    close:  generic_close,
    close:  generic_close,

powered by: WebSVN 2.1.0

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