usb-main.c

00001 #include <stdint.h>
00002 #include <stdio.h>
00003 #include <debug-uart.h>
00004 #include <sys/process.h>
00005 #include <sys/procinit.h>
00006 #include <etimer.h>
00007 #include <sys/autostart.h>
00008 #include <clock.h>
00009 
00010 unsigned int idle_count = 0;
00011 
00012 int
00013 main()
00014 {
00015   dbg_setup_uart();
00016   printf("Initialising\n");
00017   
00018   clock_init();
00019   process_init();
00020   process_start(&etimer_process, NULL);
00021   autostart_start(autostart_processes);
00022   printf("Processes running\n");
00023   while(1) {
00024     do {
00025     } while(process_run() > 0);
00026     idle_count++;
00027     /* Idle! */
00028     /* Stop processor clock */
00029     *AT91C_PMC_SCDR |= AT91C_PMC_PCK;
00030   }
00031   return 0;
00032 }

Generated on Mon Apr 11 14:23:45 2011 for Contiki 2.5 by  doxygen 1.6.1