msp430_init_dco on 2xx devices now knows defaults for MSP430F2618 chips with missing...
[goodfet] / firmware / lib / command.c
index c9c1b1c..08a5cf7 100644 (file)
@@ -1,8 +1,24 @@
+#include "command.h"
+#include "platform.h"
+#include <string.h>
+
 //! Different command handling functions.
 
 unsigned char cmddata[256];
 
-//!Transmit data.
+//! 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,
            unsigned char len){
@@ -14,3 +30,9 @@ void txdata(unsigned char app,
     serial_tx(cmddata[i]);
   }
 }
+
+//! Delay for a count.
+void delay(unsigned int count){
+  volatile unsigned int i=count;
+  while(i--) asm("nop");
+}