]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - adc_random.c
Uses tmr, runs if already on, stops, will not wake
[rgblamp.git] / adc_random.c
index d516d7fbc74b6802b1d4fe4a6f55aa3013c2ec27..e5e76940b762538c0a7ff8704d77c65a9e27fc92 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include <htc.h>
-#include "timer.h"
+#include "tmr.h"
 
 unsigned char adc_random()
 {
@@ -28,7 +28,7 @@ unsigned char adc_random()
 
     /* Sample the ADC several times, accumulating the LSB of the result */
     for (unsigned i = 0; i < 128; i++) {
-        timer_uwait(10); /* Sampling time */
+        tmr_uwait(10); /* Sampling time */
         ADGO = 1; /* Start the conversion */
         while (ADGO); /* wait for completion */
         accumulate += ADRESL;