[ECOS] Help needed for integration of my own serial driver ???

Cusson, Pascal pascal.cusson@analog.com
Thu Oct 17 12:40:00 GMT 2002


Hi everyone,
   I am trying to incorporate my serial driver into eCos. As stated in the documents, I created all the following functions. However, for some reason, my serial_handle does not get initialised. If single through the lookup function, my device is detected and read but the handle does no get initialized at all. Is initialization of the handle my responsability or eCos' resonsability ?

serial_io_handle_t serial_handle;

Here is my calling function:

error=cyg_io_lookup("/dev/ttyS0", &serial_handle);

Here is my loopup function:

static Cyg_ErrNo scc1_lookup(struct cyg_devtab_entry **tab, struct cyg_devtab_entry *sub_tab, const char * name)
{
    serial_channel *chan = (serial_channel *)(*tab)->priv;
    //(chan->callbacks->init_scc1)(chan);  // Really only required for interrupt driven devices
    return 1;
}

Here is mu initialisation functions:

DEVTAB_ENTRY(serial_scc1,"/dev/ttyS0",0,&cyg_io_serial_devio,init_scc1, scc1_lookup,0);


SERIAL_FUNS(scc1_funs, scc1_putc, scc1_getc, scc1_set_config, scc1_start_xmit, scc1_stop_xmit);

static SERIAL_CHANNEL(serial1_scc1,
                      scc1_funs,
                      scc1_info1,
                      0,
                      0,
                      0,
                      0,
                      0
        );

I initialized all the latest to 0s because my functions take care of allocating buffer and controling them.

Thanks for taking the time to look into my issue.

Pascal

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list