diff options
Diffstat (limited to 'firmware/target/arm/gigabeat/meg-fx/backlight-target.h')
-rw-r--r-- | firmware/target/arm/gigabeat/meg-fx/backlight-target.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/backlight-target.h b/firmware/target/arm/gigabeat/meg-fx/backlight-target.h index 67a055449c..781fb9647b 100644 --- a/firmware/target/arm/gigabeat/meg-fx/backlight-target.h +++ b/firmware/target/arm/gigabeat/meg-fx/backlight-target.h | |||
@@ -34,7 +34,7 @@ enum buttonlight_selection | |||
34 | /* Use these to set the buttonlight mode */ | 34 | /* Use these to set the buttonlight mode */ |
35 | enum buttonlight_mode | 35 | enum buttonlight_mode |
36 | { | 36 | { |
37 | /* ON follows the setting of the backlight - same brightness */ | 37 | /* ON follows the setting */ |
38 | BUTTONLIGHT_ON, | 38 | BUTTONLIGHT_ON, |
39 | 39 | ||
40 | /* buttonlights always off */ | 40 | /* buttonlights always off */ |
@@ -43,23 +43,37 @@ enum buttonlight_mode | |||
43 | /* buttonlights always on but set at lowest brightness */ | 43 | /* buttonlights always on but set at lowest brightness */ |
44 | BUTTONLIGHT_FAINT, | 44 | BUTTONLIGHT_FAINT, |
45 | 45 | ||
46 | /* buttonlights flicker when triggered */ | 46 | /* buttonlights flicker when triggered - continues to flicker |
47 | * even if the flicker is still asserted. | ||
48 | */ | ||
47 | BUTTONLIGHT_FLICKER, | 49 | BUTTONLIGHT_FLICKER, |
48 | }; | ||
49 | |||
50 | 50 | ||
51 | /* call to flicker the button lights */ | 51 | /* buttonlights solid for as long as triggered */ |
52 | void __buttonlight_flicker(unsigned short brightness); | 52 | BUTTONLIGHT_SIGNAL, |
53 | |||
54 | /* buttonlights follow backlight */ | ||
55 | BUTTONLIGHT_FOLLOW, | ||
56 | |||
57 | /* buttonlights show battery charging */ | ||
58 | BUTTONLIGHT_CHARGING, | ||
59 | }; | ||
53 | 60 | ||
54 | 61 | ||
55 | /* only use the XX__ENTRY when setting the mode */ | 62 | /* Call this to flicker or signal the button lights. Only is effective for |
56 | void __buttonlight_mode(enum buttonlight_mode mode); | 63 | * modes that take a trigger input. |
64 | */ | ||
65 | void __buttonlight_trigger(void); | ||
57 | 66 | ||
58 | 67 | ||
59 | /* select which led to use on the button lights. Other combinations are | 68 | /* select which led to use on the button lights. Other combinations are |
60 | * possible, but don't look very good. | 69 | * possible, but don't look very good. |
61 | */ | 70 | */ |
62 | void __buttonlight_select(enum buttonlight_selection selection); | 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); | ||
63 | 77 | ||
64 | 78 | ||
65 | void __backlight_init(void); | 79 | void __backlight_init(void); |