This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: How to activate ethernet driver
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 10 Apr 2015 14:30:02 +0000 (UTC)
- Subject: Re: How to activate ethernet driver
- Authentication-results: sourceware.org; auth=none
- References: <552447CE dot 7090807 at web dot de> <CABmKEG9HwEN_cw_8GyaxK-_JcP35Tzn_60_qfVnMiBGKjYbqRg at mail dot gmail dot com> <trinity-4777fcb7-729d-4f01-bb84-58b445200f13-1428584884951 at 3capp-webde-bs37> <CABmKEG8ZcYDnYU14YM41A-wd4iGYEpb2k+2hJ+4-shJVdt+CkQ at mail dot gmail dot com> <trinity-88db4679-45f1-4bed-85a9-70b78399a50a-1428657096995 at 3capp-webde-bs01> <CABmKEG_ROBRn8eofK3U7igUd=m5tHzt1YHHF8N2OvqqX5zK89w at mail dot gmail dot com>
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!!!
gmail.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss