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]

Re: connect ethernet cable at run-time


Hi Lars,

> 2) When the network cable is connected, cyg_netint wakes up and does its thing.

You can write an interrupt routine for the PHY chip and have that
start/stop the ethernet.
As an example, look at:
static cyg_uint32 phy_isr(cyg_vector_t vector, cyg_addrword_t data)
static void phy_dsr(cyg_vector_t vector, cyg_ucount32 count,
cyg_addrword_t data)
from
http://www.ecosforge.net/ecosforge/trunk/ecos_mpc8313/packages/devs/eth/powerpc/quicc2pro/current/src/tsec.c


Regards,
Edgar



>
> Or is there a better way? The problem is that i dont know how to do either way.
>
> All ideas are welcome. Thank you in advance.
>
> Best Regards
> Lars Dahlin
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>



-- 
Edgar Grimberg
System Developer
Zylin AS
ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00

-- 
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]