platform/minimal-net: Implement better idle behavior.

The minimal-net target, as currently written, wakes up the
CPU every millisecond to check for packets, and will only
react in real-time to input from stdin. If you are running
this on a laptop battery, your battery will quickly drain.

This change allows the CPU to idle when there is literally
nothing to do while still being responsive to input from
stein and/or incoming packets. This fix should significantly
improve performance while significantly improving power
usage. Win-win.

Also added `_xassert()` implementation so that the contiki-
provided `assert()` macro will work properly when used
on this platform.
This commit is contained in:
Robert Quattlebaum 2012-05-17 10:34:58 -07:00
parent 0a88373add
commit 092b6f3baa
5 changed files with 71 additions and 9 deletions

View file

@ -59,7 +59,6 @@ tapdev_output(void)
static void
pollhandler(void)
{
process_poll(&tapdev_process);
uip_len = tapdev_poll();
if(uip_len > 0) {