aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 13:52:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-05-27 13:52:16 +0000
commit9873f0d9548d49d471b3fcb272b081f2c3b6cd64 (patch)
tree54245e1c48653da8c65efb7139fae5d4717ac674
parent16e097d23edef273e73f64d9f7ea51ecc0636e77 (diff)
downloadChibiOS-9873f0d9548d49d471b3fcb272b081f2c3b6cd64.tar.gz
ChibiOS-9873f0d9548d49d471b3fcb272b081f2c3b6cd64.tar.bz2
ChibiOS-9873f0d9548d49d471b3fcb272b081f2c3b6cd64.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@312 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
index 825ff1eff..05fea0c69 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c
@@ -151,14 +151,12 @@ msg_t WebThread(void *p) {
EventListener el0, el1, el2;
uip_ipaddr_t ipaddr;
- EMACSetAddress(&macaddr.addr[0]);
- (void)EMACGetLinkStatus();
-
/*
* Event sources setup.
*/
chEvtRegister(&EMACFrameReceived, &el0, FRAME_RECEIVED_ID);
-
+ chEvtSend(&EMACFrameReceived); /* In case some frames are already buffered */
+
evtInit(&evt1, CH_FREQUENCY / 2);
evtStart(&evt1);
chEvtRegister(&evt1.et_es, &el1, PERIODIC_TIMER_ID);
@@ -167,7 +165,13 @@ msg_t WebThread(void *p) {
evtStart(&evt2);
chEvtRegister(&evt2.et_es, &el2, ARP_TIMER_ID);
- /*
+ /*
+ * EMAC settings.
+ */
+ EMACSetAddress(&macaddr.addr[0]);
+ (void)EMACGetLinkStatus();
+
+ /*
* uIP initialization.
*/
uip_init();