Marcoen Hirschberg | dd75488 | 2006-08-12 08:01:54 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2006 by Linus Nielsen Feltzing |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
Marcoen Hirschberg | dd75488 | 2006-08-12 08:01:54 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | #ifndef BACKLIGHT_TARGET_H |
| 22 | #define BACKLIGHT_TARGET_H |
| 23 | |
Steve Gotthardt | c07814f | 2007-01-07 06:38:57 +0000 | [diff] [blame] | 24 | /* Use these to set the buttonlight mode */ |
| 25 | enum buttonlight_mode |
| 26 | { |
Steve Gotthardt | 93b047f | 2007-01-08 08:53:36 +0000 | [diff] [blame] | 27 | /* ON follows the setting */ |
Steve Gotthardt | c07814f | 2007-01-07 06:38:57 +0000 | [diff] [blame] | 28 | BUTTONLIGHT_ON, |
| 29 | |
| 30 | /* buttonlights always off */ |
| 31 | BUTTONLIGHT_OFF, |
| 32 | |
Steve Gotthardt | 93b047f | 2007-01-08 08:53:36 +0000 | [diff] [blame] | 33 | /* buttonlights follow backlight */ |
Karl Kurbjun | 173b611 | 2007-05-07 19:34:34 +0000 | [diff] [blame] | 34 | BUTTONLIGHT_FOLLOW |
Steve Gotthardt | c07814f | 2007-01-07 06:38:57 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
Steve Gotthardt | 93b047f | 2007-01-08 08:53:36 +0000 | [diff] [blame] | 37 | /* Call this to flicker or signal the button lights. Only is effective for |
| 38 | * modes that take a trigger input. |
| 39 | */ |
| 40 | void __buttonlight_trigger(void); |
Steve Gotthardt | c07814f | 2007-01-07 06:38:57 +0000 | [diff] [blame] | 41 | |
Steve Gotthardt | 93b047f | 2007-01-08 08:53:36 +0000 | [diff] [blame] | 42 | /* map the mode from the command into the state machine entries */ |
| 43 | /* See enum buttonlight_mode for available functions */ |
Karl Kurbjun | 173b611 | 2007-05-07 19:34:34 +0000 | [diff] [blame] | 44 | void __buttonlight_mode(enum buttonlight_mode mode); |
Steve Gotthardt | c07814f | 2007-01-07 06:38:57 +0000 | [diff] [blame] | 45 | |
Jens Arnold | ef12b3b | 2007-11-12 18:49:53 +0000 | [diff] [blame] | 46 | bool _backlight_init(void); |
| 47 | void _backlight_on(void); |
| 48 | void _backlight_off(void); |
| 49 | void _backlight_set_brightness(int brightness); |
Karl Kurbjun | b15ef98 | 2007-05-08 06:57:08 +0000 | [diff] [blame] | 50 | |
Jens Arnold | ef12b3b | 2007-11-12 18:49:53 +0000 | [diff] [blame] | 51 | void _buttonlight_set_brightness(int brightness); |
| 52 | void _buttonlight_on(void); |
| 53 | void _buttonlight_off(void); |
Marcoen Hirschberg | dd75488 | 2006-08-12 08:01:54 +0000 | [diff] [blame] | 54 | #endif |