Contiki 2.5
usbmsctst.c
1 #include <string.h>
2 #include <stdio.h>
3 #include <ctype.h>
4 #include <sys/process.h>
5 #include <sys/autostart.h>
6 #include <sys/etimer.h>
7 #include <usb-api.h>
8 #include <msc/usb-msc-bulk.h>
9 
10 PROCESS(usb_masstest_process, "USB massstorage test process");
11 
12 #if 0
13 extern unsigned int idle_count;
14 #endif
15 
16 PROCESS_THREAD(usb_masstest_process, ev , data)
17 {
18  static unsigned int last_count;
19  PROCESS_BEGIN();
20  static struct etimer timer;
21  usb_msc_bulk_setup();
23 #if 0
24  last_count = idle_count;
25 #endif
26  while(1) {
28  if (ev == PROCESS_EVENT_TIMER) {
29 #if 0
30  printf("Idle count: %d\n", idle_count - last_count);
31  last_count = idle_count;
32 #endif
34  }
35  }
36  PROCESS_END();
37 }
38 
39 
40 AUTOSTART_PROCESSES(&usb_masstest_process);