]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - tmr.c
fix tmr_uwait() and tmr_mwait()
[rgblamp.git] / tmr.c
diff --git a/tmr.c b/tmr.c
index 34a9733e5737aebf2f95e9f0c070fd76ffd0a027..09e6c2d3cef8dbbb1fe0170442bac3c77175bd8e 100644 (file)
--- a/tmr.c
+++ b/tmr.c
@@ -119,17 +119,8 @@ void tmr_isr()
   }
 }
 
-/* Wait for a specific timer value t */
-#define tmr_wait(t) while (TMR0 != t);
-
 void tmr_uwait(unsigned us)
 {
-  unsigned t0 = TMR0;
-
-  while (us >= 32768) {
-    tmr_wait(t0);
-    us -= 32768;
-  }
   while (us >= 16384) {
     tmr_cwait(128);
     us -= 16384;
@@ -139,12 +130,6 @@ void tmr_uwait(unsigned us)
 
 void tmr_mwait(unsigned ms)
 {
-  unsigned t0 = TMR0;
-
-  while (ms >= 32) {
-    tmr_wait(t0);
-    ms -= 32;
-  }
   while (ms >= 16) {
     tmr_cwait(128);
     ms -= 16;