diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c | 11 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/chconf.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c index 547437047..c9b3b395e 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/web/webthread.c @@ -151,13 +151,13 @@ msg_t WebThread(void *p) { * Event sources setup.
*/
chEvtRegister(&EMACFrameReceived, &el0, FRAME_RECEIVED_ID);
- chEvtBroadcast(&EMACFrameReceived); /* In case some frames are already buffered */
+ chEvtPend(EVENT_MASK(FRAME_RECEIVED_ID)); /* In case some frames are already buffered */
- evtInit(&evt1, CH_FREQUENCY / 2);
+ evtInit(&evt1, MS2ST(500));
evtStart(&evt1);
chEvtRegister(&evt1.et_es, &el1, PERIODIC_TIMER_ID);
- evtInit(&evt2, CH_FREQUENCY * 10);
+ evtInit(&evt2, S2ST(10));
evtStart(&evt2);
chEvtRegister(&evt2.et_es, &el2, ARP_TIMER_ID);
@@ -176,7 +176,8 @@ msg_t WebThread(void *p) { uip_sethostaddr(ipaddr);
httpd_init();
- while (TRUE)
- chEvtWait(ALL_EVENTS, evhndl);
+ while (TRUE) {
+ chEvtDispatch(evhndl, chEvtWaitOne(ALL_EVENTS));
+ }
return 0;
}
diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index 5a43ac1b2..785abb912 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -133,7 +133,7 @@ * provide the \p __heap_base__ and \p __heap_end__ symbols.
* @note requires \p CH_USE_HEAP.
*/
-#define CH_HEAP_SIZE 0
+#define CH_HEAP_SIZE 512
/** Configuration option: enforces the use of the C-runtime \p malloc() and
* \p free() functions as backend for the system heap allocator.*/
|