completely redid PWM: Now calculate 'microprograms', i.e. pairs of
[moodlight.git] / ledpwm.h
CommitLineData
4307b86a 1/* $Id: ledpwm.h,v 1.4 2010/07/25 20:40:44 simimeie Exp $
17aea8ef 2 * Functions for led brightness control via PWM (pulse width modulation).
3 */
4
5#ifndef _LEDPWM_H_
6#define _LEDPWM_H_
7
4307b86a 8#define LEDPWM_REDLED 0
9#define LEDPWM_GREENLED 1
10#define LEDPWM_BLUELED 2
17aea8ef 11
ddf1553f 12extern uint8_t ledpwm_re;
13extern uint8_t ledpwm_gr;
14extern uint8_t ledpwm_bl;
15extern uint8_t ledpwm_bri;
16
4307b86a 17/* Temporary for debugging - these should be internal */
18extern volatile uint16_t ledpwm_val[3];
19extern volatile uint16_t ledpwm_curoreg;
20
17aea8ef 21/* Init PWM (pins and timers) */
22void ledpwm_init(void);
23
24/* Set brightness for a certain LED */
4307b86a 25void ledpwm_setled(uint8_t led, uint16_t val);
17aea8ef 26
de0e300b 27/* Set brightness for all LEDs */
28void ledpwm_set(uint8_t red, uint8_t green, uint8_t blue, uint8_t br);
29
17aea8ef 30#endif /* _LEDPWM_H_ */
This page took 0.069118 seconds and 4 git commands to generate.