From 077d372e2ffc959be1f13d23ee14d00a53589b4a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 23 Jul 2008 10:38:16 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@349 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c | 12 ++++++------ demos/ARM7-LPC214x-GCC/buzzer.c | 2 +- demos/ARM7-LPC214x-GCC/mmcsd.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'demos') diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c index 727cd3dc1..547437047 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c @@ -52,7 +52,7 @@ static void network_device_send(void) { for (i = 0; i < SEND_RETRY_MAX; i++) { if ((bdep = EMACGetTransmitBuffer()) != NULL) { uint8_t *bp = (uint8_t *)bdep->w1; - + if(uip_len <= UIP_LLH_LEN + UIP_TCPIP_HLEN) memcpy(bp, &uip_buf[0], uip_len); else { @@ -98,7 +98,7 @@ static void PeriodicTimerHandler(eventid_t id) { uip_arp_out(); network_device_send(); } - } + } } /* @@ -114,7 +114,7 @@ static void ARPTimerHandler(eventid_t id) { * Ethernet frame received. */ static void FrameReceivedHandler(eventid_t id) { - + while ((uip_len = network_device_read()) > 0) { if (BUF->type == HTONS(UIP_ETHTYPE_IP)) { uip_arp_ipin(); @@ -146,13 +146,13 @@ msg_t WebThread(void *p) { EvTimer evt1, evt2; EventListener el0, el1, el2; uip_ipaddr_t ipaddr; - + /* * Event sources setup. */ chEvtRegister(&EMACFrameReceived, &el0, FRAME_RECEIVED_ID); - chEvtSend(&EMACFrameReceived); /* In case some frames are already buffered */ - + chEvtBroadcast(&EMACFrameReceived); /* In case some frames are already buffered */ + evtInit(&evt1, CH_FREQUENCY / 2); evtStart(&evt1); chEvtRegister(&evt1.et_es, &el1, PERIODIC_TIMER_ID); diff --git a/demos/ARM7-LPC214x-GCC/buzzer.c b/demos/ARM7-LPC214x-GCC/buzzer.c index 249b1542b..25be0e2d9 100644 --- a/demos/ARM7-LPC214x-GCC/buzzer.c +++ b/demos/ARM7-LPC214x-GCC/buzzer.c @@ -61,7 +61,7 @@ static void stop(void *p) { TC *tc = T1Base; StopCounter(tc); - chEvtSendI(&BuzzerSilentEventSource); + chEvtBroadcastI(&BuzzerSilentEventSource); } void PlaySound(int freq, systime_t duration) { diff --git a/demos/ARM7-LPC214x-GCC/mmcsd.c b/demos/ARM7-LPC214x-GCC/mmcsd.c index 98d377406..bd1997fce 100644 --- a/demos/ARM7-LPC214x-GCC/mmcsd.c +++ b/demos/ARM7-LPC214x-GCC/mmcsd.c @@ -44,7 +44,7 @@ void tmrfunc(void *par) { if (cnt) { if (!(IO1PIN & (1 << 25))) { if (!--cnt) - chEvtSendI(&MMCInsertEventSource); + chEvtBroadcastI(&MMCInsertEventSource); } else cnt = POLLING_INTERVAL; @@ -52,7 +52,7 @@ void tmrfunc(void *par) { else { if (IO1PIN & (1 << 25)) { cnt = POLLING_INTERVAL; - chEvtSendI(&MMCRemoveEventSource); + chEvtBroadcastI(&MMCRemoveEventSource); } } chVTSetI(&vt, 10, tmrfunc, NULL); -- cgit v1.2.3