contiki-main.c
00001 #include <stm32f10x_map.h>
00002 #include <stm32f10x_dma.h>
00003 #include <gpio.h>
00004 #include <nvic.h>
00005 #include <stdint.h>
00006 #include <stdio.h>
00007 #include <debug-uart.h>
00008 #include <sys/process.h>
00009 #include <sys/procinit.h>
00010 #include <etimer.h>
00011 #include <sys/autostart.h>
00012 #include <clock.h>
00013
00014 unsigned int idle_count = 0;
00015
00016 int
00017 main()
00018 {
00019 dbg_setup_uart();
00020 printf("Initialising\n");
00021
00022 clock_init();
00023 process_init();
00024 process_start(&etimer_process, NULL);
00025 autostart_start(autostart_processes);
00026 printf("Processes running\n");
00027 while(1) {
00028 do {
00029 } while(process_run() > 0);
00030 idle_count++;
00031
00032
00033
00034 }
00035 return 0;
00036 }
00037
00038
00039
00040