Project

General

Profile

Download (1.46 KB) Statistics
| Branch: | Tag: | Revision:
1 4dc2cb5b laforge
/* main_hid - OpenPCD Human Input Device firmware
2
 *
3
 * (C) 2008 by Harald Welte <laforge@hmw-consulting.de>
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by 
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19
20
#include <errno.h>
21
#include <string.h>
22
#include <lib_AT91SAM7.h>
23
#include <openpcd.h>
24
#include <os/dbgu.h>
25
#include <os/led.h>
26
#include <os/pcd_enumerate.h>
27
#include <os/usb_handler.h>
28
29
static void help(void)
30
{
31
}
32
33
int _main_dbgu(char key)
34
{
35
	switch (key) {
36
	default:
37
		return -EINVAL;
38
	}
39
40
	return 0;
41
}
42
43
void _init_func(void)
44
{
45
	//usbtest_init();
46
}
47
48
void _main_func(void)
49
{
50
	/* first we try to get rid of pending to-be-sent stuff */
51
	usb_out_process();
52
53 8ac31009 Holger Hans Peter Freyther
	/* next we deal with incoming requests from USB EP1 (OUT) */
54 4dc2cb5b laforge
	usb_in_process();
55
56
	/* try unthrottling sources since we now are [more] likely to
57
	 * have empty request contexts */
58
	udp_unthrottle();
59
}
Add picture from clipboard (Maximum size: 48.8 MB)