1 /* AT91SAM7 "dumb reader" firmware for OpenPCD
2 * (C) 2006 by Harald Welte <hwelte@hmw-consulting.de>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <include/lib_AT91SAM7.h>
22 #include <include/openpcd.h>
25 #include "rc632_highlevel.h"
27 #include <os/pcd_enumerate.h>
28 #include <os/usb_handler.h>
29 #include "../openpcd.h"
39 int _main_dbgu(char key
)
45 AT91F_DBGU_Printk("Testing RC632 : ");
46 if (rc632_test(RAH
) == 0)
47 AT91F_DBGU_Printk("SUCCESS!\n\r");
49 AT91F_DBGU_Printk("ERROR!\n\r");
53 opcd_rc632_reg_read(RAH
, RC632_REG_RX_WAIT
, &value
);
54 DEBUGPCR("Reading RC632 Reg RxWait: 0x%02xr", value
);
58 DEBUGPCR("Writing RC632 Reg RxWait: 0x55");
59 opcd_rc632_reg_write(RAH
, RC632_REG_RX_WAIT
, 0x55);
88 /* first we try to get rid of pending to-be-sent stuff */
91 /* next we deal with incoming reqyests from USB EP1 (OUT) */