summaryrefslogtreecommitdiff
path: root/firmware/src/picc/main_openpicc.c
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-12-18 12:32:48 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-12-18 12:32:48 +0000
commit6c6b1878f4e3b9b848f6329e98d27db7b99c212b (patch)
tree43386acccc982edd82cae447a6c495e6fb154ec8 /firmware/src/picc/main_openpicc.c
parent5200cf56dd9f0c698011c59b96abdb447a76ac1f (diff)
- 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
Diffstat (limited to 'firmware/src/picc/main_openpicc.c')
-rw-r--r--firmware/src/picc/main_openpicc.c24
1 files changed, 13 insertions, 11 deletions
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 <os/pwm.h>
#include <os/tc_cdiv.h>
#include <os/pio_irq.h>
-#include <picc/poti.h>
+#include <picc/da.h>
#include <picc/pll.h>
#include <picc/ssc_picc.h>
#include <picc/load_modulation.h>
@@ -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;
}
personal git repositories of Harald Welte. Your mileage may vary