X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?p=moodlight.git;a=blobdiff_plain;f=ledpwm.c;h=e7cdefdefa99d4584249bbd633a0027bf103651d;hp=dfc26d6801c06b9ed0970b56402a0359b34f764c;hb=ddf1553f4f7cac2d6d4510e231b53d6b48028a14;hpb=32eb657a83c04b4a7499c590936da752e5b8c15e diff --git a/ledpwm.c b/ledpwm.c index dfc26d6..e7cdefd 100644 --- a/ledpwm.c +++ b/ledpwm.c @@ -1,4 +1,4 @@ -/* $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). */ @@ -8,12 +8,17 @@ /* 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 */