git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@312 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2008-05-27 13:52:16 +00:00
parent 16e097d23e
commit 9873f0d954
1 changed files with 9 additions and 5 deletions

View File

@ -151,14 +151,12 @@ msg_t WebThread(void *p) {
EventListener el0, el1, el2; EventListener el0, el1, el2;
uip_ipaddr_t ipaddr; uip_ipaddr_t ipaddr;
EMACSetAddress(&macaddr.addr[0]);
(void)EMACGetLinkStatus();
/* /*
* Event sources setup. * Event sources setup.
*/ */
chEvtRegister(&EMACFrameReceived, &el0, FRAME_RECEIVED_ID); chEvtRegister(&EMACFrameReceived, &el0, FRAME_RECEIVED_ID);
chEvtSend(&EMACFrameReceived); /* In case some frames are already buffered */
evtInit(&evt1, CH_FREQUENCY / 2); evtInit(&evt1, CH_FREQUENCY / 2);
evtStart(&evt1); evtStart(&evt1);
chEvtRegister(&evt1.et_es, &el1, PERIODIC_TIMER_ID); chEvtRegister(&evt1.et_es, &el1, PERIODIC_TIMER_ID);
@ -167,7 +165,13 @@ msg_t WebThread(void *p) {
evtStart(&evt2); evtStart(&evt2);
chEvtRegister(&evt2.et_es, &el2, ARP_TIMER_ID); chEvtRegister(&evt2.et_es, &el2, ARP_TIMER_ID);
/* /*
* EMAC settings.
*/
EMACSetAddress(&macaddr.addr[0]);
(void)EMACGetLinkStatus();
/*
* uIP initialization. * uIP initialization.
*/ */
uip_init(); uip_init();