X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=rgb.h;h=d24b41bf34cd3a389cb62b6865551911009608d5;hb=5fa3659d382d2055d1bdb1c06b6b82dcfc68bb95;hp=663e1890f89f8d9a6f97c4ee1b0b784c60254b47;hpb=2c0e3168697a040a21ee29a8dfe68d266fc98298;p=rgblamp.git diff --git a/rgb.h b/rgb.h index 663e189..d24b41b 100644 --- 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