diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-05-07 19:34:34 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-05-07 19:34:34 +0000 |
commit | 173b611921db2d353d977dc617a8288345f5e6ed (patch) | |
tree | 07927feefbc137db4f80f0e35f70da462063e376 /firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h | |
parent | 7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9 (diff) | |
download | rockbox-173b611921db2d353d977dc617a8288345f5e6ed.tar.gz rockbox-173b611921db2d353d977dc617a8288345f5e6ed.zip |
Basic gigabeat buttonlight support outside of debug menu FS#7112. Also disables USB PLL and the USB device clock (uneeded to connect to computer) - May offer some power savings. Changed how some pins are initialized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13346 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 | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h index 5f92cee935..401aa9c5e4 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h +++ b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-target.h | |||
@@ -19,18 +19,6 @@ | |||
19 | #ifndef BACKLIGHT_TARGET_H | 19 | #ifndef BACKLIGHT_TARGET_H |
20 | #define BACKLIGHT_TARGET_H | 20 | #define BACKLIGHT_TARGET_H |
21 | 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 */ | 22 | /* Use these to set the buttonlight mode */ |
35 | enum buttonlight_mode | 23 | enum buttonlight_mode |
36 | { | 24 | { |
@@ -40,47 +28,27 @@ enum buttonlight_mode | |||
40 | /* buttonlights always off */ | 28 | /* buttonlights always off */ |
41 | BUTTONLIGHT_OFF, | 29 | BUTTONLIGHT_OFF, |
42 | 30 | ||
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 */ | 31 | /* buttonlights follow backlight */ |
55 | BUTTONLIGHT_FOLLOW, | 32 | BUTTONLIGHT_FOLLOW |
56 | |||
57 | /* buttonlights show battery charging */ | ||
58 | BUTTONLIGHT_CHARGING, | ||
59 | }; | 33 | }; |
60 | 34 | ||
61 | |||
62 | /* Call this to flicker or signal the button lights. Only is effective for | 35 | /* Call this to flicker or signal the button lights. Only is effective for |
63 | * modes that take a trigger input. | 36 | * modes that take a trigger input. |
64 | */ | 37 | */ |
65 | void __buttonlight_trigger(void); | 38 | void __buttonlight_trigger(void); |
66 | 39 | ||
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 */ | 40 | /* map the mode from the command into the state machine entries */ |
73 | /* See enum buttonlight_mode for available functions */ | 41 | /* See enum buttonlight_mode for available functions */ |
74 | void __buttonlight_mode(enum buttonlight_mode mode, | 42 | void __buttonlight_mode(enum buttonlight_mode mode); |
75 | enum buttonlight_selection selection, | ||
76 | unsigned short brightness); | ||
77 | |||
78 | 43 | ||
79 | bool __backlight_init(void); | 44 | bool __backlight_init(void); |
80 | void __backlight_on(void); | 45 | void __backlight_on(void); |
81 | void __backlight_off(void); | 46 | void __backlight_off(void); |
82 | void __backlight_set_brightness(int val); | 47 | void __backlight_set_brightness(int val); |
83 | 48 | ||
49 | void __button_backlight_on(void); | ||
50 | void __button_backlight_off(void); | ||
51 | |||
84 | /* true: backlight fades off - false: backlight fades on */ | 52 | /* true: backlight fades off - false: backlight fades on */ |
85 | void __backlight_dim(bool dim); | 53 | void __backlight_dim(bool dim); |
86 | 54 | ||