summaryrefslogtreecommitdiff
path: root/firmware/src/os/dbgu.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/os/dbgu.c')
-rw-r--r--firmware/src/os/dbgu.c11
1 files changed, 11 insertions, 0 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)
personal git repositories of Harald Welte. Your mileage may vary