summaryrefslogtreecommitdiff
path: root/firmware/src/os
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/os
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/os')
-rw-r--r--firmware/src/os/dbgu.c11
-rw-r--r--firmware/src/os/pcd_enumerate.c8
2 files changed, 15 insertions, 4 deletions
diff --git a/firmware/src/os/dbgu.c b/firmware/src/os/dbgu.c
index 32432a3..026b56b 100644
--- a/firmware/src/os/dbgu.c
+++ b/firmware/src/os/dbgu.c
@@ -157,6 +157,17 @@ void AT91F_DBGU_Init(void)
"Toggle LED2\r\n9) Reset\n\r");
}
+/*
+ * Disable the PIO assignments for the DBGU
+ */
+void AT91F_DBGU_Fini(void)
+{
+ ((AT91PS_USART) AT91C_BASE_DBGU)->US_CR = AT91C_US_RXDIS | AT91C_US_TXDIS;
+ AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, AT91C_PA10_DTXD);
+ AT91F_PIO_CfgInput(AT91C_BASE_PIOA, AT91C_PA9_DRXD);
+ // Maybe FIXME, do more? -- Henryk Plötz <henryk@ploetzli.ch>
+}
+
//*----------------------------------------------------------------------------
//* \fn AT91F_DBGU_Printk
//* \brief This function is used to send a string through the DBGU channel (Very low level debugging)
diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c
index 6c45af6..5fc47a3 100644
--- a/firmware/src/os/pcd_enumerate.c
+++ b/firmware/src/os/pcd_enumerate.c
@@ -557,18 +557,18 @@ out:
void udp_pullup_on(void)
{
- AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP);
#ifdef PCD
- AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4);
+ AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP);
#endif
+ AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4);
}
void udp_pullup_off(void)
{
- AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP);
#ifdef PCD
- AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4);
+ AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUP);
#endif
+ AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPCD_PIO_UDP_PUPv4);
}
/* Open USB Device Port */
personal git repositories of Harald Welte. Your mileage may vary