summaryrefslogtreecommitdiff
path: root/Debugger/debug_macros.h
diff options
context:
space:
mode:
authorTC Wan2010-12-23 18:30:11 +0800
committerTC Wan2010-12-23 18:30:11 +0800
commitc351d60d912c121b3c4e22b8b53e5d946bb5f748 (patch)
treeff5d481e615cee23d1c39b57a21bd7408347497d /Debugger/debug_macros.h
parent58494668ef864db0ad6cd35eca62106cbbed0543 (diff)
checkin wip for communications support
Start implementing USB communications support
Diffstat (limited to 'Debugger/debug_macros.h')
-rw-r--r--Debugger/debug_macros.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Debugger/debug_macros.h b/Debugger/debug_macros.h
index 416022e..f66e42c 100644
--- a/Debugger/debug_macros.h
+++ b/Debugger/debug_macros.h
@@ -91,6 +91,23 @@
sub \deststrptr, \deststrptr, #1 /* Adjust Destination string pointer to point at NULL character */
.endm
+/* _dbg_memcpy
+ * _dbg_stpcpy macro
+ * On entry:
+ * deststrptr: Destination string [Cannot be R0]
+ * sourcestrptr: Source string [Cannot be R0]
+ * sizereg: Number of bytes to copy [Cannot be R0]
+ * On exit:
+ * deststrptr: Pointer to NULL character in destination string
+ * R0: destroyed
+ */
+ .macro _dbg_memcpy deststrptr, sourcestrptr, sizereg
+1: ldrb r0, [\sourcestrptr], #1
+ strb r0, [\deststrptr], #1
+ subs \sizereg, \sizereg, #1
+ bne 1b
+ .endm
+
/* _dbg_outputMsgValidResponse
* Return Message with valid response ('+$')
* On exit: