Added initialization of the time synchronization module

This commit is contained in:
adamdunkels 2007-12-16 15:03:35 +00:00
parent d80052c0e7
commit d13648292e

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)$Id: contiki-sky-main.c,v 1.18 2007/11/28 23:28:35 adamdunkels Exp $ * @(#)$Id: contiki-sky-main.c,v 1.19 2007/12/16 15:03:35 adamdunkels Exp $
*/ */
#include <signal.h> #include <signal.h>
@ -51,6 +51,8 @@
#include "net/mac/xmac.h" #include "net/mac/xmac.h"
#include "net/mac/nullmac.h" #include "net/mac/nullmac.h"
#include "sys/timesynch.h"
#include "node-id.h" #include "node-id.h"
#include "sys/profile.h" #include "sys/profile.h"
@ -139,7 +141,7 @@ main(int argc, char **argv)
#endif /* WITH_UIP */ #endif /* WITH_UIP */
/* printf("Starting %s " */ /* printf("Starting %s " */
/* "($Id: contiki-sky-main.c,v 1.18 2007/11/28 23:28:35 adamdunkels Exp $)\n", __FILE__); */ /* "($Id: contiki-sky-main.c,v 1.19 2007/12/16 15:03:35 adamdunkels Exp $)\n", __FILE__); */
leds_on(LEDS_GREEN); leds_on(LEDS_GREEN);
ds2411_init(); ds2411_init();
sensors_light_init(); sensors_light_init();
@ -193,7 +195,12 @@ main(int argc, char **argv)
simple_cc2420_init(); simple_cc2420_init();
simple_cc2420_set_chan_pan_addr(RF_CHANNEL, panId, 0 /*XXX*/, ds2411_id); simple_cc2420_set_chan_pan_addr(RF_CHANNEL, panId, 0 /*XXX*/, ds2411_id);
/* rime_init(nullmac_init(&simple_cc2420_driver));*/ /* rime_init(nullmac_init(&simple_cc2420_driver));*/
rime_init(xmac_init(&simple_cc2420_driver)); /* rime_init(xmac_init(&simple_cc2420_driver));*/
/* rime_init(timesynch_init(nullmac_init(&simple_cc2420_driver)));*/
rime_init(timesynch_init(xmac_init(&simple_cc2420_driver)));
timesynch_set_authority_level(node_id);
/* rimeaddr_set_node_addr*/ /* rimeaddr_set_node_addr*/
#if WITH_UIP #if WITH_UIP