openpcd/firmware/src/pcd/main_usb.c @ master
1 | 2f13a231 | (no author) | /* main_usb - OpenPCD test firmware for benchmarking USB performance
|
---|---|---|---|
2 | * (C) 2006 by Harald Welte <laforge@gnumonks.org>
|
||
3 | */
|
||
4 | |||
5 | #include <errno.h>
|
||
6 | #include <string.h>
|
||
7 | #include <lib_AT91SAM7.h>
|
||
8 | 706ffa9f | laforge | #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>
|
||
13 | 2f13a231 | (no author) | |
14 | static void help(void) |
||
15 | {
|
||
16 | }
|
||
17 | |||
18 | int _main_dbgu(char key) |
||
19 | {
|
||
20 | switch (key) { |
||
21 | default:
|
||
22 | return -EINVAL; |
||
23 | }
|
||
24 | |||
25 | return 0; |
||
26 | }
|
||
27 | |||
28 | 16e8b89e | (no author) | void _init_func(void) |
29 | {
|
||
30 | usbtest_init(); |
||
31 | }
|
||
32 | |||
33 | 2f13a231 | (no author) | void _main_func(void) |
34 | {
|
||
35 | /* first we try to get rid of pending to-be-sent stuff */
|
||
36 | 706ffa9f | laforge | usb_out_process(); |
37 | 2f13a231 | (no author) | |
38 | 8ac31009 | Holger Hans Peter Freyther | /* next we deal with incoming requests from USB EP1 (OUT) */
|
39 | 16e8b89e | (no author) | usb_in_process(); |
40 | 2f13a231 | (no author) | |
41 | /* try unthrottling sources since we now are [more] likely to
|
||
42 | * have empty request contexts */
|
||
43 | 16e8b89e | (no author) | udp_unthrottle(); |
44 | 2f13a231 | (no author) | }
|