This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Question about the ethernet hardware device driver?
- From: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- To: "Ecos-Discuss \(E-mail\)" <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 4 Jul 2002 18:32:23 +0100
- Subject: [ECOS] Question about the ethernet hardware device driver?
Hi all:
I am trying to use the ethernet device driver in my project. I have
looked into the source code for the ethernet hardware device driver, there
is something I can't really understand. could anyone give me some help.
Thanks a lot!
Question:
While "registering" a ethernet hardware driver we usually use the macro:
ETH_DRV_SC(DRV_sc,
0, // No driver specific data needed
"eth0", // Name for this interface
HRDWR_start,
HRDWR_stop,
HRDWR_control,
HRDWR_can_send
HRDWR_send,
HRDWR_recv);
NETDEVTAB_ENTRY(DRV_netdev,
"DRV",
DRV_HRDWR_init,
&DRV_sc);
any as said in the doc that: DRV_HRDWR_init() is called as part of the
system initialization process, is that means it is called before the user's
application main() or cyg_main() etc.?
In iosys.c I saw that the startup for the device driver the hardware init()
function is called via a handler __DEVTAB__ t->init(), but for the ethernet
hardware device driver is registered as netdev, is that also points to the
__DEVTAB__ ? or are they the same of different table? where is the
DRV_HRDWR_init() called if not during ecos system initilisation(before user
program)?
Thanks a lot!
Best regards!
james
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss