JTAG430X2 works at 16MHz, not at 3MHz.
[goodfet] / firmware / lib / command.c
index c572a1d..f585e4c 100644 (file)
@@ -1,3 +1,7 @@
+#include "command.h"
+#include "platform.h"
+#include <string.h>
+
 //! Different command handling functions.
 
 unsigned char cmddata[256];
@@ -32,3 +36,13 @@ void delay(unsigned int count){
   volatile unsigned int i=count;
   while(i--) asm("nop");
 }
+//! MSDelay
+void msdelay(unsigned int ms){
+  volatile unsigned int i,j;
+  i=100;
+  while(i--){
+    j=ms;
+    while(j--) asm("nop");
+  }
+  //Using TimerA might be cleaner.
+}