From 0689e3dd6752f45f493eceb3edf040fbc7849846 Mon Sep 17 00:00:00 2001
From: oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Date: Thu, 28 Feb 2008 08:11:18 +0000
Subject: - Added TARGET_REQ_DEBUGCHAR target_request debugmsg. This   provides
 a better impeadance match for debug output char fn's, e.g. eCos. - Line
 endings are now added at the caller site of command_print*(). command_print()
   still adds a line ending - echo of commands in scripts are now available
 via debug_level instead of   forced echo - Added a USER_SAMELINE() for
 printing without a lineend.

git-svn-id: svn://svn.berlios.de/openocd/trunk@364 b42882b7-edfa-0310-969c-e2dbd0fdcd60
---
 src/target/target_request.c | 10 ++++++++++
 src/target/target_request.h |  1 +
 2 files changed, 11 insertions(+)

(limited to 'src/target')

diff --git a/src/target/target_request.c b/src/target/target_request.c
index e23a0f7d..020ee790 100644
--- a/src/target/target_request.c
+++ b/src/target/target_request.c
@@ -53,6 +53,13 @@ int target_asciimsg(target_t *target, u32 length)
 	return ERROR_OK;
 }
 
+int target_charmsg(target_t *target, u8 msg)
+{
+	USER_SAMELINE("%c", msg);
+	
+	return ERROR_OK;
+}
+
 int target_hexmsg(target_t *target, int size, u32 length)
 {
 	u8 *data = malloc(CEIL(length * size, 4) * 4);
@@ -122,6 +129,9 @@ int target_request(target_t *target, u32 request)
 				target_hexmsg(target, (request & 0xff00) >> 8, (request & 0xffff0000) >> 16);
 			}
 			break;
+		case TARGET_REQ_DEBUGCHAR:
+			target_charmsg(target, (request & 0x00ff0000) >> 16);
+			break;
 /*		case TARGET_REQ_SEMIHOSTING:
  *			break;
  */
diff --git a/src/target/target_request.h b/src/target/target_request.h
index 6aacaed7..0547c1d3 100644
--- a/src/target/target_request.h
+++ b/src/target/target_request.h
@@ -26,6 +26,7 @@ typedef enum target_req_cmd
 {
 	TARGET_REQ_TRACEMSG,
 	TARGET_REQ_DEBUGMSG,
+	TARGET_REQ_DEBUGCHAR,
 /*	TARGET_REQ_SEMIHOSTING, */
 } target_req_cmd_t;
 
-- 
cgit v1.2.3