diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2007-04-18 12:22:27 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2007-04-18 12:22:27 +0000 |
commit | f44f961812c059b69df19ac5bd828986ba10513f (patch) | |
tree | 9b19de69126ed041992f31a7c690db841a36af6f /firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h | |
parent | c3dcc87aa494934943769b70fd752af1271d196a (diff) | |
download | rockbox-f44f961812c059b69df19ac5bd828986ba10513f.tar.gz rockbox-f44f961812c059b69df19ac5bd828986ba10513f.zip |
move the Gigabeat from gigabeat/meg-fx to s3c2440/gigabeat-fx to avoid problems with possible ports in the future: Gigabeat S/V (i.mx31 based) and Kenwood HD20GA7/HD20GA9 (s3c2440 based)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13200 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h new file mode 100644 index 0000000000..5f92cee935 --- /dev/null +++ b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Linus Nielsen Feltzing | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef BACKLIGHT_TARGET_H | ||
20 | #define BACKLIGHT_TARGET_H | ||
21 | |||
22 | |||
23 | /* select the led */ | ||
24 | enum buttonlight_selection | ||
25 | { | ||
26 | /* all leds */ | ||
27 | BUTTONLIGHT_LED_ALL, | ||
28 | |||
29 | /* only the menu/power led (two buttons for one LED) */ | ||
30 | BUTTONLIGHT_LED_MENU | ||
31 | }; | ||
32 | |||
33 | |||
34 | /* Use these to set the buttonlight mode */ | ||
35 | enum buttonlight_mode | ||
36 | { | ||
37 | /* ON follows the setting */ | ||
38 | BUTTONLIGHT_ON, | ||
39 | |||
40 | /* buttonlights always off */ | ||
41 | BUTTONLIGHT_OFF, | ||
42 | |||
43 | /* buttonlights always on but set at lowest brightness */ | ||
44 | BUTTONLIGHT_FAINT, | ||
45 | |||
46 | /* buttonlights flicker when triggered - continues to flicker | ||
47 | * even if the flicker is still asserted. | ||
48 | */ | ||
49 | BUTTONLIGHT_FLICKER, | ||
50 | |||
51 | /* buttonlights solid for as long as triggered */ | ||
52 | BUTTONLIGHT_SIGNAL, | ||
53 | |||
54 | /* buttonlights follow backlight */ | ||
55 | BUTTONLIGHT_FOLLOW, | ||
56 | |||
57 | /* buttonlights show battery charging */ | ||
58 | BUTTONLIGHT_CHARGING, | ||
59 | }; | ||
60 | |||
61 | |||
62 | /* Call this to flicker or signal the button lights. Only is effective for | ||
63 | * modes that take a trigger input. | ||
64 | */ | ||
65 | void __buttonlight_trigger(void); | ||
66 | |||
67 | |||
68 | /* select which led to use on the button lights. Other combinations are | ||
69 | * possible, but don't look very good. | ||
70 | */ | ||
71 | |||
72 | /* map the mode from the command into the state machine entries */ | ||
73 | /* See enum buttonlight_mode for available functions */ | ||
74 | void __buttonlight_mode(enum buttonlight_mode mode, | ||
75 | enum buttonlight_selection selection, | ||
76 | unsigned short brightness); | ||
77 | |||
78 | |||
79 | bool __backlight_init(void); | ||
80 | void __backlight_on(void); | ||
81 | void __backlight_off(void); | ||
82 | void __backlight_set_brightness(int val); | ||
83 | |||
84 | /* true: backlight fades off - false: backlight fades on */ | ||
85 | void __backlight_dim(bool dim); | ||
86 | |||
87 | #endif | ||