projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Faster SPI Flash dumping, but it's a bit ugly.
[goodfet]
/
firmware
/
lib
/
command.c
diff --git
a/firmware/lib/command.c
b/firmware/lib/command.c
index
9a9421d
..
08a5cf7
100644
(file)
--- a/
firmware/lib/command.c
+++ b/
firmware/lib/command.c
@@
-1,7
+1,23
@@
+#include "command.h"
+#include "platform.h"
+#include <string.h>
+
//! Different command handling functions.
unsigned char cmddata[256];
//! Different command handling functions.
unsigned char cmddata[256];
+//! Transmit a string.
+void txstring(unsigned char app,
+ unsigned char verb,
+ const char *str){
+ unsigned char len=strlen(str);
+ serial_tx(app);
+ serial_tx(verb);
+ serial_tx(len);
+ while(len--)
+ serial_tx(*(str++));
+}
+
//! Transmit data.
void txdata(unsigned char app,
unsigned char verb,
//! Transmit data.
void txdata(unsigned char app,
unsigned char verb,
@@
-15,7
+31,6
@@
void txdata(unsigned char app,
}
}
}
}
-
//! Delay for a count.
void delay(unsigned int count){
volatile unsigned int i=count;
//! Delay for a count.
void delay(unsigned int count){
volatile unsigned int i=count;