diff options
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h | 31 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c | 12 |
2 files changed, 36 insertions, 7 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h new file mode 100644 index 0000000000..67836aa790 --- /dev/null +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef BACKLIGHT_TARGET_H | ||
22 | #define BACKLIGHT_TARGET_H | ||
23 | |||
24 | #include <stdbool.h> | ||
25 | |||
26 | bool _backlight_init(void); | ||
27 | void _backlight_on(void); | ||
28 | void _backlight_off(void); | ||
29 | void _backlight_set_brightness(int brightness); | ||
30 | |||
31 | #endif /* BACKLIGHT_TARGET_H */ | ||
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c index 691e5c4b16..a91e041184 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c | |||
@@ -30,10 +30,10 @@ | |||
30 | #define LCD_PCLK (20000000) /* LCD PCLK */ | 30 | #define LCD_PCLK (20000000) /* LCD PCLK */ |
31 | 31 | ||
32 | #define my__gpio_as_lcd_16bit() \ | 32 | #define my__gpio_as_lcd_16bit() \ |
33 | do { \ | 33 | do { \ |
34 | REG_GPIO_PXFUNS(2) = 0x0014ffff; \ | 34 | REG_GPIO_PXFUNS(2) = 0x0014ffff; \ |
35 | REG_GPIO_PXSELC(2) = 0x0014ffff; \ | 35 | REG_GPIO_PXSELC(2) = 0x0014ffff; \ |
36 | REG_GPIO_PXPES(2) = 0x0014ffff; \ | 36 | REG_GPIO_PXPES(2) = 0x0014ffff; \ |
37 | } while (0) | 37 | } while (0) |
38 | 38 | ||
39 | 39 | ||
@@ -53,7 +53,7 @@ static void _display_pin_init(void) | |||
53 | DELAY; /* delay_ms(10); */ | 53 | DELAY; /* delay_ms(10); */ |
54 | 54 | ||
55 | __gpio_set_pin(PIN_RESET_N); | 55 | __gpio_set_pin(PIN_RESET_N); |
56 | DELAY; /* delay_ms(10); */ | 56 | DELAY; /* delay_ms(10); */ |
57 | __gpio_clear_pin(PIN_RESET_N); | 57 | __gpio_clear_pin(PIN_RESET_N); |
58 | DELAY; /* delay_ms(10); */ | 58 | DELAY; /* delay_ms(10); */ |
59 | __gpio_set_pin(PIN_RESET_N); | 59 | __gpio_set_pin(PIN_RESET_N); |
@@ -157,8 +157,6 @@ static void _set_lcd_bus(void) | |||
157 | REG_SLCD_CFG = (SLCD_CFG_BURST_4_WORD | SLCD_CFG_DWIDTH_18 | SLCD_CFG_CWIDTH_18BIT | 157 | REG_SLCD_CFG = (SLCD_CFG_BURST_4_WORD | SLCD_CFG_DWIDTH_18 | SLCD_CFG_CWIDTH_18BIT |
158 | | SLCD_CFG_CS_ACTIVE_LOW | SLCD_CFG_RS_CMD_LOW | SLCD_CFG_CLK_ACTIVE_FALLING | 158 | | SLCD_CFG_CS_ACTIVE_LOW | SLCD_CFG_RS_CMD_LOW | SLCD_CFG_CLK_ACTIVE_FALLING |
159 | | SLCD_CFG_TYPE_PARALLEL); | 159 | | SLCD_CFG_TYPE_PARALLEL); |
160 | |||
161 | REG_SLCD_CTRL = SLCD_CTRL_DMA_EN; | ||
162 | } | 160 | } |
163 | 161 | ||
164 | static void _set_lcd_clock(void) | 162 | static void _set_lcd_clock(void) |