X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fcommand.c;h=f585e4cd8bde289800e66ec53b4753de7713049e;hp=c572a1dc7cfa27ceb6284b20eeb04247867f4ea3;hb=0fb25630e9970a4e6d18e190c484f654490565b0;hpb=1f226af77a28d66cbe8eff845e4fee3370798ab8 diff --git a/firmware/lib/command.c b/firmware/lib/command.c index c572a1d..f585e4c 100644 --- a/firmware/lib/command.c +++ b/firmware/lib/command.c @@ -1,3 +1,7 @@ +#include "command.h" +#include "platform.h" +#include + //! 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. +}