]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - timer.c
Incorporate new tmr and isr code
[rgblamp.git] / timer.c
diff --git a/timer.c b/timer.c
deleted file mode 100644 (file)
index 0975cb8..0000000
--- a/timer.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * File:   timer.c
- *
- * Timer 0 + Timer 1 for timekeeping
- */
-
-
-#include <htc.h>
-#include "timer.h"
-
-void timer_uwait(unsigned us)
-{
-  unsigned t0 = TMR0;
-
-  TMR0IF = 0;
-  while (us >= 32768) {
-    timer_owait();
-    us -= 32768;
-  }
-  while (us >= 16384) {
-    timer_cwait(128);
-    us -= 16384;
-  }
-  timer_cwait(us / 128);
-}
-
-void timer_mwait(unsigned ms)
-{
-  unsigned t0 = TMR0;
-
-  TMR0IF = 0;
-  while (ms >= 32) {
-    timer_owait();
-    ms -= 32;
-  }
-  while (ms >= 16) {
-    timer_cwait(128);
-    ms -= 16;
-  }
-  timer_cwait(ms * 8);
-}