2006-08-12 08:01:54 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 by Linus Nielsen Feltzing
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef BACKLIGHT_TARGET_H
|
|
|
|
#define BACKLIGHT_TARGET_H
|
|
|
|
|
2007-01-07 06:38:57 +00:00
|
|
|
|
|
|
|
/* select the led */
|
|
|
|
enum buttonlight_selection
|
|
|
|
{
|
|
|
|
/* all leds */
|
|
|
|
BUTTONLIGHT_LED_ALL,
|
|
|
|
|
|
|
|
/* only the menu/power led (two buttons for one LED) */
|
|
|
|
BUTTONLIGHT_LED_MENU
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* Use these to set the buttonlight mode */
|
|
|
|
enum buttonlight_mode
|
|
|
|
{
|
2007-01-08 08:53:36 +00:00
|
|
|
/* ON follows the setting */
|
2007-01-07 06:38:57 +00:00
|
|
|
BUTTONLIGHT_ON,
|
|
|
|
|
|
|
|
/* buttonlights always off */
|
|
|
|
BUTTONLIGHT_OFF,
|
|
|
|
|
|
|
|
/* buttonlights always on but set at lowest brightness */
|
|
|
|
BUTTONLIGHT_FAINT,
|
|
|
|
|
2007-01-08 08:53:36 +00:00
|
|
|
/* buttonlights flicker when triggered - continues to flicker
|
|
|
|
* even if the flicker is still asserted.
|
|
|
|
*/
|
2007-01-07 06:38:57 +00:00
|
|
|
BUTTONLIGHT_FLICKER,
|
|
|
|
|
2007-01-08 08:53:36 +00:00
|
|
|
/* buttonlights solid for as long as triggered */
|
|
|
|
BUTTONLIGHT_SIGNAL,
|
|
|
|
|
|
|
|
/* buttonlights follow backlight */
|
|
|
|
BUTTONLIGHT_FOLLOW,
|
|
|
|
|
|
|
|
/* buttonlights show battery charging */
|
|
|
|
BUTTONLIGHT_CHARGING,
|
|
|
|
};
|
2007-01-07 06:38:57 +00:00
|
|
|
|
|
|
|
|
2007-01-08 08:53:36 +00:00
|
|
|
/* Call this to flicker or signal the button lights. Only is effective for
|
|
|
|
* modes that take a trigger input.
|
|
|
|
*/
|
|
|
|
void __buttonlight_trigger(void);
|
2007-01-07 06:38:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* select which led to use on the button lights. Other combinations are
|
|
|
|
* possible, but don't look very good.
|
|
|
|
*/
|
2007-01-08 08:53:36 +00:00
|
|
|
|
|
|
|
/* map the mode from the command into the state machine entries */
|
|
|
|
/* See enum buttonlight_mode for available functions */
|
|
|
|
void __buttonlight_mode(enum buttonlight_mode mode,
|
|
|
|
enum buttonlight_selection selection,
|
|
|
|
unsigned short brightness);
|
2007-01-07 06:38:57 +00:00
|
|
|
|
|
|
|
|
2006-12-29 02:49:12 +00:00
|
|
|
void __backlight_init(void);
|
2006-08-12 08:01:54 +00:00
|
|
|
void __backlight_on(void);
|
|
|
|
void __backlight_off(void);
|
|
|
|
void __backlight_set_brightness(int val);
|
|
|
|
|
2007-01-07 06:38:57 +00:00
|
|
|
/* true: backlight fades off - false: backlight fades on */
|
2007-01-04 09:32:49 +00:00
|
|
|
void __backlight_dim(bool dim);
|
|
|
|
|
2006-08-12 08:01:54 +00:00
|
|
|
#endif
|