X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fcommand.c;h=738fab6271e306385082da670b4a643e839fdaac;hp=08a5cf7494c91bad21bf19d9534c132bb6c0bcee;hb=3e4369fde16445c994da1b1efb332704aad0716d;hpb=3bf98a899ca8003835b69d949d299369a5d7a4f7 diff --git a/firmware/lib/command.c b/firmware/lib/command.c index 08a5cf7..738fab6 100644 --- a/firmware/lib/command.c +++ b/firmware/lib/command.c @@ -31,8 +31,21 @@ void txdata(unsigned char app, } } +//Be very careful changing delay(). +//It was chosen poorly by trial and error. + //! Delay for a count. 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. +}