From 6c6b1878f4e3b9b848f6329e98d27db7b99c212b Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 18 Dec 2006 12:32:48 +0000 Subject: - add new DAC driver (instead of poti) for PICC - DFU: put all DEBUG_ defines in "#ifdef DEBUG" enclosure - alter GPIO defines for new OpenPICC v0.4 prototype - add new AT91F_DBGU_Fini() function - take care of new inverted USB pullip in OpenPICC v0.4 prototype - fix typo in 'opicc_reg_write' macro - add some more PICC related SSC code NOTE: this firmware is the first version that will _NOT_ run on a OpenPICC v0.3 anymore! (All changes by Henryk Ploetz) git-svn-id: https://svn.openpcd.org:2342/trunk@283 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/src/picc/main_openpicc.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'firmware/src/picc/main_openpicc.c') diff --git a/firmware/src/picc/main_openpicc.c b/firmware/src/picc/main_openpicc.c index ff89dc2..3e615a4 100644 --- a/firmware/src/picc/main_openpicc.c +++ b/firmware/src/picc/main_openpicc.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ void _init_func(void) /* low-level hardware initialization */ pio_irq_init(); pll_init(); - poti_init(); + da_init(); load_mod_init(); tc_cdiv_init(); tc_fdt_init(); @@ -64,12 +64,13 @@ void _init_func(void) opicc_usbapi_init(); AT91F_PIO_CfgInput(AT91C_BASE_PIOA, OPENPICC_PIO_BOOTLDR); + da_comp_carr(64); } static void help(void) { - DEBUGPCR("q: poti decrease q: poti increase\r\n" - "e: poti retransmit P: PLL inhibit toggle"); + DEBUGPCR("q: da decrease w: da increase\r\n" + "e: da retransmit P: PLL inhibit toggle"); DEBUGPCR("o: decrease duty p: increase duty\r\n" "k: stop pwm l: start pwn\r\n" "n: decrease freq m: incresae freq"); @@ -96,18 +97,18 @@ int _main_dbgu(char key) case 'q': if (poti > 0) poti--; - poti_comp_carr(poti); - DEBUGPCRF("Poti: %u", poti); + da_comp_carr(poti); + DEBUGPCRF("DA: %u", poti); break; case 'w': - if (poti < 127) + if (poti < 255) poti++; - poti_comp_carr(poti); - DEBUGPCRF("Poti: %u", poti); + da_comp_carr(poti); + DEBUGPCRF("DA: %u", poti); break; case 'e': - poti_comp_carr(poti); - DEBUGPCRF("Poti: %u", poti); + da_comp_carr(poti); + DEBUGPCRF("DA: %u", poti); break; case 'P': pll_inh++; @@ -238,6 +239,7 @@ int _main_dbgu(char key) tc_cdiv_print(); //tc_fdt_print(); + ssc_print(); return -EINVAL; } -- cgit v1.2.3