diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2015-01-12 12:02:24 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2015-01-12 12:02:24 +0100 |
commit | 9ffd9327e339ee9028654000497525b62e826652 (patch) | |
tree | 2ec951353c3d5b7c927b97a448a55e8d7e9ae521 /firmware/target | |
parent | bbd7d1dba39ab1a89b4cc0c18352e35349e66faa (diff) | |
download | rockbox-9ffd9327e339ee9028654000497525b62e826652.tar.gz rockbox-9ffd9327e339ee9028654000497525b62e826652.zip |
Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
Diffstat (limited to 'firmware/target')
10 files changed, 33 insertions, 41 deletions
diff --git a/firmware/target/arm/ipod/backlight-mini1g_mini2g.c b/firmware/target/arm/ipod/backlight-mini1g_mini2g.c index 1d57b7742e..8dd7ef87bd 100644 --- a/firmware/target/arm/ipod/backlight-mini1g_mini2g.c +++ b/firmware/target/arm/ipod/backlight-mini1g_mini2g.c | |||
@@ -34,12 +34,12 @@ | |||
34 | #include "backlight.h" | 34 | #include "backlight.h" |
35 | #include "backlight-target.h" | 35 | #include "backlight-target.h" |
36 | 36 | ||
37 | void _backlight_hw_on(void) | 37 | void backlight_hw_on(void) |
38 | { | 38 | { |
39 | GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); | 39 | GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); |
40 | } | 40 | } |
41 | 41 | ||
42 | void _backlight_hw_off(void) | 42 | void backlight_hw_off(void) |
43 | { | 43 | { |
44 | GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x08); | 44 | GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x08); |
45 | } | 45 | } |
diff --git a/firmware/target/arm/ipod/backlight-target.h b/firmware/target/arm/ipod/backlight-target.h index fef7ee8ce0..299a1cb6e7 100644 --- a/firmware/target/arm/ipod/backlight-target.h +++ b/firmware/target/arm/ipod/backlight-target.h | |||
@@ -39,11 +39,11 @@ void lcd_awake(void); | |||
39 | #define backlight_hw_off() do { _backlight_led_off(); \ | 39 | #define backlight_hw_off() do { _backlight_led_off(); \ |
40 | _backlight_hw_enable(false); } while(0) | 40 | _backlight_hw_enable(false); } while(0) |
41 | #else /* !BOOTLOADER */ | 41 | #else /* !BOOTLOADER */ |
42 | #define backlight_hw_on_isr() _backlight_led_on() | 42 | #define _backlight_on_isr() _backlight_led_on() |
43 | #define backlight_hw_off_isr() _backlight_led_off() | 43 | #define _backlight_off_isr() _backlight_led_off() |
44 | #define backlight_hw_on_normal() do { _backlight_hw_enable(true); \ | 44 | #define _backlight_on_normal() do { _backlight_hw_enable(true); \ |
45 | _backlight_led_on(); } while(0) | 45 | _backlight_led_on(); } while(0) |
46 | #define backlight_hw_off_normal() do { _backlight_led_off(); \ | 46 | #define _backlight_off_normal() do { _backlight_led_off(); \ |
47 | _backlight_hw_enable(false); } while(0) | 47 | _backlight_hw_enable(false); } while(0) |
48 | #define _BACKLIGHT_FADE_ENABLE | 48 | #define _BACKLIGHT_FADE_ENABLE |
49 | #endif /* !BOOTLOADER */ | 49 | #endif /* !BOOTLOADER */ |
@@ -58,17 +58,14 @@ void backlight_hw_brightness(int val); | |||
58 | #elif defined(IPOD_MINI) || defined(IPOD_MINI2G) | 58 | #elif defined(IPOD_MINI) || defined(IPOD_MINI2G) |
59 | 59 | ||
60 | #define backlight_hw_init() true | 60 | #define backlight_hw_init() true |
61 | void _backlight_hw_on(void); | 61 | void backlight_hw_on(void); |
62 | void _backlight_hw_off(void); | 62 | void backlight_hw_off(void); |
63 | 63 | ||
64 | #ifdef BOOTLOADER | 64 | #ifndef BOOTLOADER |
65 | #define backlight_hw_on() _backlight_hw_on() | 65 | #define _backlight_on_isr() backlight_hw_on() |
66 | #define backlight_hw_off() _backlight_hw_off() | 66 | #define _backlight_off_isr() backlight_hw_off() |
67 | #else | 67 | #define _backlight_on_normal() backlight_hw_on() |
68 | #define backlight_hw_on_isr() _backlight_hw_on() | 68 | #define _backlight_off_normal() backlight_hw_off() |
69 | #define backlight_hw_off_isr() _backlight_hw_off() | ||
70 | #define backlight_hw_on_normal() _backlight_hw_on() | ||
71 | #define backlight_hw_off_normal() _backlight_hw_off() | ||
72 | #endif | 69 | #endif |
73 | 70 | ||
74 | #elif defined(IPOD_1G2G) || defined(IPOD_3G) | 71 | #elif defined(IPOD_1G2G) || defined(IPOD_3G) |
diff --git a/firmware/target/arm/olympus/mrobe-100/backlight-target.h b/firmware/target/arm/olympus/mrobe-100/backlight-target.h index 725e1ad622..17776698c3 100644 --- a/firmware/target/arm/olympus/mrobe-100/backlight-target.h +++ b/firmware/target/arm/olympus/mrobe-100/backlight-target.h | |||
@@ -23,8 +23,8 @@ | |||
23 | #define BACKLIGHT_TARGET_H | 23 | #define BACKLIGHT_TARGET_H |
24 | 24 | ||
25 | bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ | 25 | bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ |
26 | void _backlight_hw_on(void); | 26 | void backlight_hw_on(void); |
27 | void _backlight_hw_off(void); | 27 | void backlight_hw_off(void); |
28 | 28 | ||
29 | #ifdef HAVE_REMOTE_LCD | 29 | #ifdef HAVE_REMOTE_LCD |
30 | void remote_backlight_hw_on(void); | 30 | void remote_backlight_hw_on(void); |
diff --git a/firmware/target/arm/pbell/vibe500/backlight-target.h b/firmware/target/arm/pbell/vibe500/backlight-target.h index 396fea3007..f924d01de8 100644 --- a/firmware/target/arm/pbell/vibe500/backlight-target.h +++ b/firmware/target/arm/pbell/vibe500/backlight-target.h | |||
@@ -30,9 +30,9 @@ void backlight_hw_brightness(int brightness); | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef HAVE_BUTTON_LIGHT | 32 | #ifdef HAVE_BUTTON_LIGHT |
33 | voidbuttonlight_hw_on(void); | 33 | void buttonlight_hw_on(void); |
34 | voidbuttonlight_hw_off(void); | 34 | void buttonlight_hw_off(void); |
35 | voidbuttonlight_hw_set_brightness(int brightness); | 35 | void buttonlight_hw_set_brightness(int brightness); |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #endif /* BACKLIGHT_TARGET.H */ | 38 | #endif /* BACKLIGHT_TARGET.H */ |
diff --git a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c index 6c8541ef62..df2ea1f307 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c | |||
@@ -92,7 +92,7 @@ int button_read_device(int *data) | |||
92 | if (!(GPIOA & 0x4)) | 92 | if (!(GPIOA & 0x4)) |
93 | btn |= BUTTON_POWER; | 93 | btn |= BUTTON_POWER; |
94 | 94 | ||
95 | if (btn & BUTTON_TOUCHSCREEN && !isbacklight_hw_on(true)) | 95 | if (btn & BUTTON_TOUCHSCREEN && !is_backlight_on(true)) |
96 | old_data = *data = 0; | 96 | old_data = *data = 0; |
97 | 97 | ||
98 | return btn; | 98 | return btn; |
diff --git a/firmware/target/coldfire/iriver/h100/backlight-h100.c b/firmware/target/coldfire/iriver/h100/backlight-h100.c index 1f582ec8df..80e340c0d5 100644 --- a/firmware/target/coldfire/iriver/h100/backlight-h100.c +++ b/firmware/target/coldfire/iriver/h100/backlight-h100.c | |||
@@ -35,12 +35,12 @@ bool backlight_hw_init(void) | |||
35 | return (GPIO1_OUT & 0x00020000) ? false : true; | 35 | return (GPIO1_OUT & 0x00020000) ? false : true; |
36 | } | 36 | } |
37 | 37 | ||
38 | void _backlight_hw_on(void) | 38 | void backlight_hw_on(void) |
39 | { | 39 | { |
40 | and_l(~0x00020000, &GPIO1_OUT); | 40 | and_l(~0x00020000, &GPIO1_OUT); |
41 | } | 41 | } |
42 | 42 | ||
43 | void _backlight_hw_off(void) | 43 | void backlight_hw_off(void) |
44 | { | 44 | { |
45 | or_l(0x00020000, &GPIO1_OUT); | 45 | or_l(0x00020000, &GPIO1_OUT); |
46 | } | 46 | } |
diff --git a/firmware/target/coldfire/iriver/h100/backlight-target.h b/firmware/target/coldfire/iriver/h100/backlight-target.h index 64d0353ab0..b6cc4a2000 100644 --- a/firmware/target/coldfire/iriver/h100/backlight-target.h +++ b/firmware/target/coldfire/iriver/h100/backlight-target.h | |||
@@ -26,10 +26,10 @@ void backlight_hw_on(void); | |||
26 | void backlight_hw_off(void); | 26 | void backlight_hw_off(void); |
27 | 27 | ||
28 | #ifndef BOOTLOADER | 28 | #ifndef BOOTLOADER |
29 | #define backlight_hw_on_isr() backlight_hw_on() | 29 | #define _backlight_on_isr() backlight_hw_on() |
30 | #define backlight_hw_off_isr() backlight_hw_off() | 30 | #define _backlight_off_isr() backlight_hw_off() |
31 | #define backlight_hw_on_normal() backlight_hw_on() | 31 | #define _backlight_on_normal() backlight_hw_on() |
32 | #define backlight_hw_off_normal() backlight_hw_off() | 32 | #define _backlight_off_normal() backlight_hw_off() |
33 | #define _BACKLIGHT_FADE_BOOST | 33 | #define _BACKLIGHT_FADE_BOOST |
34 | #endif | 34 | #endif |
35 | 35 | ||
diff --git a/firmware/target/coldfire/mpio/backlight-mpio.c b/firmware/target/coldfire/mpio/backlight-mpio.c index e04fa6d7dc..9d8186beed 100644 --- a/firmware/target/coldfire/mpio/backlight-mpio.c +++ b/firmware/target/coldfire/mpio/backlight-mpio.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "backlight-target.h" | 27 | #include "backlight-target.h" |
28 | #include "lcd.h" | 28 | #include "lcd.h" |
29 | 29 | ||
30 | static bool backlight_hw_on = true; | 30 | static bool _backlight_on = true; |
31 | static int _brightness = DEFAULT_BRIGHTNESS_SETTING; | 31 | static int _brightness = DEFAULT_BRIGHTNESS_SETTING; |
32 | 32 | ||
33 | /* Returns the current state of the backlight (true=ON, false=OFF). */ | 33 | /* Returns the current state of the backlight (true=ON, false=OFF). */ |
@@ -41,23 +41,23 @@ bool backlight_hw_init(void) | |||
41 | return true; | 41 | return true; |
42 | } | 42 | } |
43 | 43 | ||
44 | void _backlight_hw_on(void) | 44 | void backlight_hw_on(void) |
45 | { | 45 | { |
46 | #ifndef BOOTLOADER | 46 | #ifndef BOOTLOADER |
47 | if (backlight_hw_on) | 47 | if (_backlight_on) |
48 | return; | 48 | return; |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | backlight_hw_brightness(_brightness); | 51 | backlight_hw_brightness(_brightness); |
52 | backlight_hw_on = true; | 52 | _backlight_on = true; |
53 | 53 | ||
54 | } | 54 | } |
55 | 55 | ||
56 | void _backlight_hw_off(void) | 56 | void backlight_hw_off(void) |
57 | { | 57 | { |
58 | /* GPIO28 low */ | 58 | /* GPIO28 low */ |
59 | and_l(~(1<<28),&GPIO_OUT); | 59 | and_l(~(1<<28),&GPIO_OUT); |
60 | backlight_hw_on = false; | 60 | _backlight_on = false; |
61 | } | 61 | } |
62 | 62 | ||
63 | void backlight_hw_brightness(int val) | 63 | void backlight_hw_brightness(int val) |
@@ -65,7 +65,7 @@ void backlight_hw_brightness(int val) | |||
65 | unsigned char i; | 65 | unsigned char i; |
66 | 66 | ||
67 | #ifndef BOOTLOADER | 67 | #ifndef BOOTLOADER |
68 | if( _brightness == val && backlight_hw_on == true ) | 68 | if( _brightness == val && _backlight_on == true ) |
69 | return; | 69 | return; |
70 | #endif | 70 | #endif |
71 | 71 | ||
diff --git a/firmware/target/coldfire/mpio/backlight-target.h b/firmware/target/coldfire/mpio/backlight-target.h index b73bf27c89..12a3e7a225 100644 --- a/firmware/target/coldfire/mpio/backlight-target.h +++ b/firmware/target/coldfire/mpio/backlight-target.h | |||
@@ -25,9 +25,4 @@ bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ | |||
25 | void backlight_hw_on(void); | 25 | void backlight_hw_on(void); |
26 | void backlight_hw_off(void); | 26 | void backlight_hw_off(void); |
27 | void backlight_hw_brightness(int val); | 27 | void backlight_hw_brightness(int val); |
28 | |||
29 | #define backlight_hw_on_isr() backlight_hw_on() | ||
30 | #define backlight_hw_off_isr() backlight_hw_off() | ||
31 | #define backlight_hw_on_normal() backlight_hw_on() | ||
32 | #define backlight_hw_off_normal() backlight_hw_off() | ||
33 | #endif | 28 | #endif |
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c b/firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c index a810fde704..d06cb28f40 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c | |||
@@ -184,7 +184,7 @@ int button_read_device(int *data) | |||
184 | #if CONFIG_ORIENTATION == SCREEN_LANDSCAPE | 184 | #if CONFIG_ORIENTATION == SCREEN_LANDSCAPE |
185 | *data = (*data & 0xFFFF) | ((LCD_HEIGHT - (*data >> 16)) << 16); | 185 | *data = (*data & 0xFFFF) | ((LCD_HEIGHT - (*data >> 16)) << 16); |
186 | #endif | 186 | #endif |
187 | if( UNLIKELY(!isbacklight_hw_on(true)) ) | 187 | if( UNLIKELY(!is_backlight_on(true)) ) |
188 | *data = 0; | 188 | *data = 0; |
189 | 189 | ||
190 | old_data = *data; | 190 | old_data = *data; |