This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]