summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-09 03:12:45 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-09 03:12:45 +0000
commit3a98ae12852a75f2331571fafb148f55ee073969 (patch)
treefac1787d76dc5f3e2918e055cbc695b955699904
parent1965e3ced86c090f5996fd38810efe7750c66f48 (diff)
- move rc632 specific debug commands from dbgu to main_dumbreader
- re-enable usb support in main_dumbreader git-svn-id: https://svn.openpcd.org:2342/trunk@145 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r--openpcd/firmware/src/os/dbgu.c22
-rw-r--r--openpcd/firmware/src/pcd/main_dumbreader.c32
2 files changed, 32 insertions, 22 deletions
diff --git a/openpcd/firmware/src/os/dbgu.c b/openpcd/firmware/src/os/dbgu.c
index e64d8eb..0cb4244 100644
--- a/openpcd/firmware/src/os/dbgu.c
+++ b/openpcd/firmware/src/os/dbgu.c
@@ -78,28 +78,6 @@ static void DBGU_irq_handler(void)
AT91F_DBGU_Printk("Toggling LED 2\n\r");
led_toggle(2);
break;
-#if 0
- case '4':
- AT91F_DBGU_Printk("Testing RC632 : ");
- if (rc632_test(RAH) == 0)
- AT91F_DBGU_Printk("SUCCESS!\n\r");
- else
- AT91F_DBGU_Printk("ERROR!\n\r");
-
- break;
- case '5':
- rc632_reg_read(RAH, RC632_REG_RX_WAIT, &value);
- DEBUGPCR("Reading RC632 Reg RxWait: 0x%02xr", value);
-
- break;
- case '6':
- DEBUGPCR("Writing RC632 Reg RxWait: 0x55");
- rc632_reg_write(RAH, RC632_REG_RX_WAIT, 0x55);
- break;
- case '7':
- rc632_dump();
- break;
-#endif
default:
if (_main_dbgu(value) < 0)
AT91F_DBGU_Printk("\n\r");
diff --git a/openpcd/firmware/src/pcd/main_dumbreader.c b/openpcd/firmware/src/pcd/main_dumbreader.c
index 21c4135..9e20876 100644
--- a/openpcd/firmware/src/pcd/main_dumbreader.c
+++ b/openpcd/firmware/src/pcd/main_dumbreader.c
@@ -13,11 +13,43 @@ void _init_func(void)
{
rc632_init();
udp_init();
+ udp_open();
rc632_test(RAH);
}
int _main_dbgu(char key)
{
+ unsigned char value;
+
+ switch (key) {
+ case '4':
+ AT91F_DBGU_Printk("Testing RC632 : ");
+ if (rc632_test(RAH) == 0)
+ AT91F_DBGU_Printk("SUCCESS!\n\r");
+ else
+ AT91F_DBGU_Printk("ERROR!\n\r");
+
+ break;
+ case '5':
+ rc632_reg_read(RAH, RC632_REG_RX_WAIT, &value);
+ DEBUGPCR("Reading RC632 Reg RxWait: 0x%02xr", value);
+
+ break;
+ case '6':
+ DEBUGPCR("Writing RC632 Reg RxWait: 0x55");
+ rc632_reg_write(RAH, RC632_REG_RX_WAIT, 0x55);
+ break;
+ case '7':
+ rc632_dump();
+ break;
+ case 'P':
+ rc632_power(1);
+ break;
+ case 'p':
+ rc632_power(0);
+ break;
+ }
+
return -EINVAL;
}
personal git repositories of Harald Welte. Your mileage may vary