summaryrefslogtreecommitdiff
path: root/firmware/src/dfu/dbgu.c
diff options
context:
space:
mode:
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