+#ifdef CEIL256
+extern const unsigned char pwm_table[];
+#define rgb_set(red, grn, blu, wht) do { \
+ ndi(); /* FIXME: doesn't seem to fix flicker */ \
+ CCPR3L = pwm_table[(red)]; \
+ CCPR2L = pwm_table[(grn)]; \
+ CCPR4L = pwm_table[(blu)]; \
+ CCPR1L = pwm_table[(wht)]; \
+ nei(); \
+} while (0)
+#else
+#ifdef CEIL32
+extern const unsigned char pwm_table[];
+#define rgb_set(red, grn, blu, wht) do { \
+ ndi(); /* FIXME: doesn't seem to fix flicker */ \
+ CCPR3L = pwm_table[(red) >> 3]; \
+ CCPR2L = pwm_table[(grn) >> 3]; \
+ CCPR4L = pwm_table[(blu) >> 3]; \
+ CCPR1L = pwm_table[(wht) >> 3]; \
+ nei(); \
+} while (0)
+#else