Initial commit
[kk_librfid.git] / firmware / src / pcd / .svn / text-base / main_usb.c.svn-base
blobfcd3306223aff96fe71f8a6fc02548141d08257c
1 /* main_usb - OpenPCD test firmware for benchmarking USB performance
2  * (C) 2006 by Harald Welte <laforge@gnumonks.org>
3  */
5 #include <errno.h>
6 #include <string.h>
7 #include <lib_AT91SAM7.h>
8 #include <openpcd.h>
9 #include <os/dbgu.h>
10 #include <os/led.h>
11 #include <os/pcd_enumerate.h>
12 #include <os/usb_handler.h>
14 static void help(void)
18 int _main_dbgu(char key)
20         switch (key) {
21         default:
22                 return -EINVAL;
23         }
25         return 0;
28 void _init_func(void)
30         usbtest_init();
33 void _main_func(void)
35         /* first we try to get rid of pending to-be-sent stuff */
36         usb_out_process();
38         /* next we deal with incoming reqyests from USB EP1 (OUT) */
39         usb_in_process();
41         /* try unthrottling sources since we now are [more] likely to
42          * have empty request contexts */
43         udp_unthrottle();