-/* $Id: ledpwm.c,v 1.1 2010/06/26 19:08:18 simimeie Exp $
+/* $Id: ledpwm.c,v 1.2 2010/06/30 19:39:28 simimeie Exp $
* Functions for led brightness control via PWM (pulse width modulation).
*/
/* Select between Phase correct PWM and Fast PWM mode.
* setting this to 1 selects phase correct mode, everything else is Fast PWM. */
#define PHASECORRECTPWM 1
+
/*
* Our hardware connections are as follows:
* Red -> PD6 / OC0A
* Green -> PD5 / OC0B
* Blue -> PD3 / OC2B
*/
+
+uint8_t ledpwm_re = 0xff, ledpwm_gr = 0xff, ledpwm_bl = 0xff;
+uint8_t ledpwm_bri = 128;
+
void ledpwm_init(void)
{
/* Set OC2B, OC0A and OC0B to output */