summaryrefslogtreecommitdiff
path: root/firmware/src/dfu/dbgu.c
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-22 22:10:46 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-22 22:10:46 +0000
commit1ba82b71074e31e0a9451e80c2de4bca2716adf2 (patch)
treee5ea5d41d2487af9e7a38e8b1ca69d0a5707e526 /firmware/src/dfu/dbgu.c
parent706ffa9f3b986eff193377142459fbfde2362036 (diff)
make sure DFU loader always prints some informational / copyright message upon startup
git-svn-id: https://svn.openpcd.org:2342/trunk@220 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/dfu/dbgu.c')
-rw-r--r--firmware/src/dfu/dbgu.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/firmware/src/dfu/dbgu.c b/firmware/src/dfu/dbgu.c
index 367a399..9bfefc3 100644
--- a/firmware/src/dfu/dbgu.c
+++ b/firmware/src/dfu/dbgu.c
@@ -24,8 +24,6 @@
#include <stdio.h>
#include <string.h>
-#ifdef DEBUG
-
#define USART_SYS_LEVEL 4
void AT91F_DBGU_Ready(void)
{
@@ -70,7 +68,6 @@ void AT91F_DBGU_Init(void)
DBGU_irq_handler);
AT91F_AIC_EnableIt(AT91C_BASE_AIC, AT91C_ID_SYS);
- AT91F_DBGU_Printk("\n\rsam7dfu (C) 2006 by Harald Welte\n\r");
}
void AT91F_DBGU_Printk(char *buffer)
@@ -81,6 +78,18 @@ void AT91F_DBGU_Printk(char *buffer)
}
}
+int AT91F_DBGU_Get(char *val)
+{
+ if ((AT91F_US_RxReady((AT91PS_USART) AT91C_BASE_DBGU)) == 0)
+ return (0);
+ else {
+ *val = AT91F_US_GetChar((AT91PS_USART) AT91C_BASE_DBGU);
+ return (-1);
+ }
+}
+
+#ifdef DEBUG
+
void AT91F_DBGU_Frame(char *buffer)
{
unsigned char len;
@@ -91,15 +100,6 @@ void AT91F_DBGU_Frame(char *buffer)
(unsigned char *)buffer, len, 0, 0);
}
-int AT91F_DBGU_Get(char *val)
-{
- if ((AT91F_US_RxReady((AT91PS_USART) AT91C_BASE_DBGU)) == 0)
- return (0);
- else {
- *val = AT91F_US_GetChar((AT91PS_USART) AT91C_BASE_DBGU);
- return (-1);
- }
-}
const char *
hexdump(const void *data, unsigned int len)
personal git repositories of Harald Welte. Your mileage may vary