This is the mail archive of the ecos-discuss@sourceware.org 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]

ethernet driver


Hi all,

I am using i386 PC with eCos.

I have to make an Ethernet driver, which just sends
and receives the data, but not in a format of TCP/IP
packet. 
I need to initialize the port and send a char byte
(take ?S?) on one port infinitely. And on the same
time I have another Ethernet port, which will be
receiving data. Here both the ports are on same board
and both the ports will be directly connected to each
other with out any 'switch' or 'HUB' in between.

I did study of eCos i82559 driver, there are few list
of api?s I think I can use. So. If I use libraries
with eCos Ethernet driver (eth0 & eth1) disabled, with
an application looking something like given below,
then will it work?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Static void TX_thread(CYG_ADDRESS data) // fot eth0
port
{
Xxx_i82559_init(struct cyg_netdevtab_entry * ndp)
// With all relevant modifications

While (1)
{
Xxx_i82559_send (struct eth_drv_sc *sc, struct
eth_drv_sg *sg_list, int sg_len, int total_len,
unsigned long key)
		// With all relevant modification
}
}

Static void RX_thread(CYG_ADDRESS data) // for eth1
port
{
Xxx_i82559_init(struct cyg_netdevtab_entry * ndp)
// With all relevant modifications

While (1)
{
Xxx_i82559_recv( struct eth_drv_sc *sc, struct
eth_drv_sg *sg_list, int 
sg_len );
// With all relevant modifications

diag_printf(?the data %c?, data byte received);
}
}


void cyg_user_start(void)
{
	// Create and resume the TX_thread & RX_thread
}

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  

I am new to Ethernet. Please help me. 

Thanks & Regards,
Ram Kumar


Send instant messages to your online friends http://in.messenger.yahoo.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


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