]> oss.titaniummirror.com Git - rgblamp.git/blobdiff - rgb.h
Incorporate new tmr and isr code
[rgblamp.git] / rgb.h
diff --git a/rgb.h b/rgb.h
index 663e1890f89f8d9a6f97c4ee1b0b784c60254b47..d24b41bf34cd3a389cb62b6865551911009608d5 100644 (file)
--- a/rgb.h
+++ b/rgb.h
@@ -8,6 +8,8 @@
 #ifndef _RGB_H
 #define _RGB_H
 
+#include "isr.h"
+
 /* Initialize the RGB LED assembly.  Outputs are zero, PWM is off. */
 void rgb_init();
 
@@ -19,10 +21,12 @@ void rgb_off();
 
 /* Set a PWM value for each color LED.  0=off, 255=full on. */
 #define rgb_set(red, grn, blu, wht) do { \
+    ndi(); /* FIXME: doesn't seem to fix flicker */ \
     CCPR1L = (red); \
     CCPR2L = (grn); \
     CCPR3L = (blu); \
     CCPR4L = (wht); \
+    nei(); \
 } while (0)
 
 #endif