energest needs to be initialized before network

This commit is contained in:
nifi 2008-03-13 15:58:44 +00:00
parent 7fcb9554f4
commit 3ecd955f01

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: contiki-esb-main.c,v 1.14 2008/03/07 17:54:22 nifi Exp $
* @(#)$Id: contiki-esb-main.c,v 1.15 2008/03/13 15:58:44 nifi Exp $
*/
#include <io.h>
@ -118,6 +118,15 @@ main(void)
ctimer_init();
#if PROFILE_CONF_ON
profile_init();
#endif /* PROFILE_CONF_ON */
#if ENERGEST_CONF_ON
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);
#endif /* ENERGEST_CONF_ON */
init_net();
printf(CONTIKI_VERSION_STRING " started. ");
@ -132,15 +141,6 @@ main(void)
clock_delay(100);
leds_off(LEDS_RED);
#if PROFILE_CONF_ON
profile_init();
#endif /* PROFILE_CONF_ON */
#if ENERGEST_CONF_ON
energest_init();
ENERGEST_ON(ENERGEST_TYPE_CPU);
#endif /* ENERGEST_CONF_ON */
init_apps();
print_processes(autostart_processes);
autostart_start(autostart_processes);