From 71de0ff028a43985cfec4a3a4b39af4cbca048bd Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> Date: Sun, 10 Sep 2006 00:04:34 +0000 Subject: allow user to control comparator poti via serial port git-svn-id: https://svn.openpcd.org:2342/trunk@165 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpcd/firmware/src/picc/main_openpicc.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/openpcd/firmware/src/picc/main_openpicc.c b/openpcd/firmware/src/picc/main_openpicc.c index 59e5bac..b8b51a0 100644 --- a/openpcd/firmware/src/picc/main_openpicc.c +++ b/openpcd/firmware/src/picc/main_openpicc.c @@ -11,18 +11,37 @@ void _init_func(void) { - tc_cdiv_init(); - adc_init(); - ssc_rx_init(); + //tc_cdiv_init(); + //adc_init(); + //ssc_rx_init(); + //poti_init(); // ssc_tx_init(); } int _main_dbgu(char key) { unsigned char value; + static u_int8_t poti = 64; + + DEBUGPCRF("main_dbgu"); switch (key) { - #if 0 + case 'q': + if (poti > 0) + poti--; + poti_comp_carr(poti); + DEBUGPCRF("Poti: %u", poti); + break; + case 'w': + if (poti < 126) + poti++; + poti_comp_carr(poti); + DEBUGPCRF("Poti: %u", poti); + break; + case 'e': + poti_init(); + break; +#if 0 case '4': AT91F_DBGU_Printk("Testing RC632 : "); if (rc632_test(RAH) == 0) -- cgit v1.2.3