[ECOS] Re: How to activate ethernet driver

Grant Edwards grant.b.edwards@gmail.com
Fri Apr 10 14:30:00 GMT 2015

On 2015-04-10, Jerzy Dyrda <jerzdy@gmail.com> wrote:
> Hello Dennis,
> 2015-04-10 11:11 GMT+02:00  <Incubus84@web.de>:
> [snip]
> We are a bit closer.

>> I digged a little deeper in the source code and found the function
>> "cyg_io_init" which iterates over the __DEVTAB__ table. I can see how
>> it runs through different devices like tty, flash, adc, ... but not
>> the ethernet driver. As far as I understand the reference manual,
>> this SHOULD happen here too!
> No exactly, it seems that Ethernet driver is a different sort of
> devices strictly connected to network stack.


True.  However, you can create a "normal" driver table entry for an
Ethernet driver if you want to.

Then you can have an init function called exactly once at system
startup time.

You can also then use use cyg_io_read(), cyg_io_write(),
cyg_io_set_config(), cyg_io_get_config() etc. for whatever you want.
I've done that in the past for a number of Ethernet drivers so that
user application can read/write raw MAC-level packets for certain
proprietary Ethernet protocols. [The eCos network stacks didn't used
to provide any mechanism for that].  We also use the normal cyg_io API
to allow application code to configure and uery a variety of features
in the Ethernet controller hardware that the normal network stacks are
not aware of and for which they provide no API.

Grant Edwards               grant.b.edwards        Yow! Don't hit me!!  I'm in
                                  at               the Twilight Zone!!!

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

More information about the Ecos-discuss mailing list