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 | |
parent | bbd7d1dba39ab1a89b4cc0c18352e35349e66faa (diff) |
Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
12 files changed, 38 insertions, 46 deletions
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index fc445c5403..bb6823522d 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c @@ -469,7 +469,7 @@ static unsigned long _grey_get_pixel(int x, int y) static void _timer_isr(void) { #if defined(HAVE_BACKLIGHT_INVERSION) && !defined(SIMULATOR) - unsigned long check = rb->isbacklight_hw_on(true) + unsigned long check = rb->is_backlight_on(true) ? 0 : _GREY_BACKLIGHT_ON; if ((_grey_info.flags & (_GREY_BACKLIGHT_ON|GREY_RAWMAPPED)) == check) @@ -648,7 +648,7 @@ bool grey_init(unsigned char *gbuf, long gbuf_size, else { #if defined(HAVE_BACKLIGHT_INVERSION) && !defined(SIMULATOR) - if (rb->isbacklight_hw_on(true)) + if (rb->is_backlight_on(true)) _grey_info.flags |= _GREY_BACKLIGHT_ON; #endif fill_gvalues(); 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 @@ #include "backlight.h" #include "backlight-target.h" -void _backlight_hw_on(void) +void backlight_hw_on(void) { GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); } -void _backlight_hw_off(void) +void backlight_hw_off(void) { GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x08); } 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); #define backlight_hw_off() do { _backlight_led_off(); \ _backlight_hw_enable(false); } while(0) #else /* !BOOTLOADER */ -#define backlight_hw_on_isr() _backlight_led_on() -#define backlight_hw_off_isr() _backlight_led_off() -#define backlight_hw_on_normal() do { _backlight_hw_enable(true); \ +#define _backlight_on_isr() _backlight_led_on() +#define _backlight_off_isr() _backlight_led_off() +#define _backlight_on_normal() do { _backlight_hw_enable(true); \ _backlight_led_on(); } while(0) -#define backlight_hw_off_normal() do { _backlight_led_off(); \ +#define _backlight_off_normal() do { _backlight_led_off(); \ _backlight_hw_enable(false); } while(0) #define _BACKLIGHT_FADE_ENABLE #endif /* !BOOTLOADER */ @@ -58,17 +58,14 @@ void backlight_hw_brightness(int val); #elif defined(IPOD_MINI) || defined(IPOD_MINI2G) #define backlight_hw_init() true -void _backlight_hw_on(void); -void _backlight_hw_off(void); +void backlight_hw_on(void); +void backlight_hw_off(void); -#ifdef BOOTLOADER -#define backlight_hw_on() _backlight_hw_on() -#define backlight_hw_off() _backlight_hw_off() -#else -#define backlight_hw_on_isr() _backlight_hw_on() -#define backlight_hw_off_isr() _backlight_hw_off() -#define backlight_hw_on_normal() _backlight_hw_on() -#define backlight_hw_off_normal() _backlight_hw_off() +#ifndef BOOTLOADER +#define _backlight_on_isr() backlight_hw_on() +#define _backlight_off_isr() backlight_hw_off() +#define _backlight_on_normal() backlight_hw_on() +#define _backlight_off_normal() backlight_hw_off() #endif #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 @@ #define BACKLIGHT_TARGET_H bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */ -void _backlight_hw_on(void); -void _backlight_hw_off(void); +void backlight_hw_on(void); +void backlight_hw_off(void); #ifdef HAVE_REMOTE_LCD 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); #endif #ifdef HAVE_BUTTON_LIGHT -voidbuttonlight_hw_on(void); -voidbuttonlight_hw_off(void); -voidbuttonlight_hw_set_brightness(int brightness); +void buttonlight_hw_on(void); +void buttonlight_hw_off(void); +void buttonlight_hw_set_brightness(int brightness); #endif #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) if (!(GPIOA & 0x4)) btn |= BUTTON_POWER; - if (btn & BUTTON_TOUCHSCREEN && !isbacklight_hw_on(true)) + if (btn & BUTTON_TOUCHSCREEN && !is_backlight_on(true)) old_data = *data = 0; 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) return (GPIO1_OUT & 0x00020000) ? false : true; } -void _backlight_hw_on(void) +void backlight_hw_on(void) { and_l(~0x00020000, &GPIO1_OUT); } -void _backlight_hw_off(void) +void backlight_hw_off(void) { or_l(0x00020000, &GPIO1_OUT); } 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); void backlight_hw_off(void); #ifndef BOOTLOADER -#define backlight_hw_on_isr() backlight_hw_on() -#define backlight_hw_off_isr() backlight_hw_off() -#define backlight_hw_on_normal() backlight_hw_on() -#define backlight_hw_off_normal() backlight_hw_off() +#define _backlight_on_isr() backlight_hw_on() +#define _backlight_off_isr() backlight_hw_off() +#define _backlight_on_normal() backlight_hw_on() +#define _backlight_off_normal() backlight_hw_off() #define _BACKLIGHT_FADE_BOOST #endif 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 @@ #include "backlight-target.h" #include "lcd.h" -static bool backlight_hw_on = true; +static bool _backlight_on = true; static int _brightness = DEFAULT_BRIGHTNESS_SETTING; /* Returns the current state of the backlight (true=ON, false=OFF). */ @@ -41,23 +41,23 @@ bool backlight_hw_init(void) return true; } -void _backlight_hw_on(void) +void backlight_hw_on(void) { #ifndef BOOTLOADER - if (backlight_hw_on) + if (_backlight_on) return; #endif backlight_hw_brightness(_brightness); - backlight_hw_on = true; + _backlight_on = true; } -void _backlight_hw_off(void) +void backlight_hw_off(void) { /* GPIO28 low */ and_l(~(1<<28),&GPIO_OUT); - backlight_hw_on = false; + _backlight_on = false; } void backlight_hw_brightness(int val) @@ -65,7 +65,7 @@ void backlight_hw_brightness(int val) unsigned char i; #ifndef BOOTLOADER - if( _brightness == val && backlight_hw_on == true ) + if( _brightness == val && _backlight_on == true ) return; #endif 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). */ void backlight_hw_on(void); void backlight_hw_off(void); void backlight_hw_brightness(int val); - -#define backlight_hw_on_isr() backlight_hw_on() -#define backlight_hw_off_isr() backlight_hw_off() -#define backlight_hw_on_normal() backlight_hw_on() -#define backlight_hw_off_normal() backlight_hw_off() #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) #if CONFIG_ORIENTATION == SCREEN_LANDSCAPE *data = (*data & 0xFFFF) | ((LCD_HEIGHT - (*data >> 16)) << 16); #endif - if( UNLIKELY(!isbacklight_hw_on(true)) ) + if( UNLIKELY(!is_backlight_on(true)) ) *data = 0; old_data = *data; diff --git a/uisimulator/common/backlight-sim.h b/uisimulator/common/backlight-sim.h index f7e35dcc75..cd77d0287b 100644 --- a/uisimulator/common/backlight-sim.h +++ b/uisimulator/common/backlight-sim.h @@ -32,10 +32,10 @@ void backlight_hw_off(void); void backlight_hw_brightness(int val); #endif /* HAVE_BACKLIGHT_BRIGHTNESS */ #ifdef HAVE_BUTTON_LIGHT -voidbuttonlight_hw_on(void); -voidbuttonlight_hw_off(void); +void buttonlight_hw_on(void); +void buttonlight_hw_off(void); #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS -voidbuttonlight_hw_set_brightness(int val); +void buttonlight_hw_set_brightness(int val); #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */ #endif /* HAVE_BUTTON_LIGHT */ |