From 3a98ae12852a75f2331571fafb148f55ee073969 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Sat, 9 Sep 2006 03:12:45 +0000 Subject: - 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 --- openpcd/firmware/src/os/dbgu.c | 22 -------------------- openpcd/firmware/src/pcd/main_dumbreader.c | 32 ++++++++++++++++++++++++++++++ 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; } -- cgit v1.2.3