summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/dsp/arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tms320dm320/dsp/arm.c')
-rw-r--r--firmware/target/arm/tms320dm320/dsp/arm.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/firmware/target/arm/tms320dm320/dsp/arm.c b/firmware/target/arm/tms320dm320/dsp/arm.c
index 9ae59d7cbe..a9d9d800e4 100644
--- a/firmware/target/arm/tms320dm320/dsp/arm.c
+++ b/firmware/target/arm/tms320dm320/dsp/arm.c
@@ -8,6 +8,7 @@
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2008 by Catalin Patulea 10 * Copyright (C) 2008 by Catalin Patulea
11 * Copyright (C) 2009 by Karl Kurbjun
11 * 12 *
12 * This program is free software; you can redistribute it and/or 13 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 14 * modify it under the terms of the GNU General Public License
@@ -32,13 +33,8 @@ interrupt void handle_int0(void) {
32 acked = 1; 33 acked = 1;
33} 34}
34 35
35void debugf(const char *fmt, ...) { 36void waitforack(void)
36 va_list args; 37{
37 va_start(args, fmt);
38 status.msg = MSG_DEBUGF;
39 vsnprintf((char *)status.payload.debugf.buffer, sizeof(status), fmt, args);
40 va_end(args);
41
42 /* Wait until ARM has picked up data. */ 38 /* Wait until ARM has picked up data. */
43 acked = 0; 39 acked = 0;
44 int_arm(); 40 int_arm();
@@ -47,5 +43,16 @@ void debugf(const char *fmt, ...) {
47 asm(" IDLE 1"); 43 asm(" IDLE 1");
48 asm(" NOP"); 44 asm(" NOP");
49 } 45 }
46}
47
48void debugf(const char *fmt, ...) {
49 va_list args;
50 va_start(args, fmt);
51 status.msg = MSG_DEBUGF;
52 vsnprintf((char *)status.payload.debugf.buffer, sizeof(status), fmt, args);
53 va_end(args);
54
55 waitforack();
56
50 acked = 2; 57 acked = 2;
51} 58}