summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/onda_vx747
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-20 10:54:13 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-20 10:54:13 +0000
commit582942016bdf3599952b343858ba9fb9785494e8 (patch)
tree05d17c750bc4ed952c0da49f9f000fc7ae96ed11 /firmware/target/mips/ingenic_jz47xx/onda_vx747
parentd13f49737a6a04fae8b8288ae6d25d33ac6e4dfc (diff)
downloadrockbox-582942016bdf3599952b343858ba9fb9785494e8.tar.gz
rockbox-582942016bdf3599952b343858ba9fb9785494e8.tar.bz2
rockbox-582942016bdf3599952b343858ba9fb9785494e8.zip
* Commit a modified FS#10354 (thanks to Davide Quarta) - add support the VX747+ in scramble and configure
* Add support for the VX777 * Remove the touchscreen mode switching combo from the button driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21379 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx747')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/sadc-onda_vx747.c15
1 files changed, 9 insertions, 6 deletions
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 ebc2f214a9..24caac0100 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
@@ -42,6 +42,8 @@
#define BTN_HOLD (1 << 22) /* on REG_GPIO_PXPIN(2) */
#define BTN_MENU (1 << 20)
#define BTN_VOL_UP (1 << 19)
+#elif defined(ONDA_VX777)
+/* TODO */
#else
#error No buttons defined!
#endif
@@ -123,7 +125,7 @@ unsigned int battery_adc_voltage(void)
}
void button_init_device(void)
-{
+{
#ifdef ONDA_VX747
__gpio_as_input(32*3 + 29);
__gpio_as_input(32*3 + 27);
@@ -146,6 +148,8 @@ bool button_hold(void)
(~REG_GPIO_PXPIN(3)) & BTN_HOLD
#elif defined(ONDA_VX747P)
(~REG_GPIO_PXPIN(2)) & BTN_HOLD
+#elif defined(ONDA_VX777)
+ false /* TODO */
#endif
? true : false
);
@@ -153,13 +157,14 @@ bool button_hold(void)
int button_read_device(int *data)
{
- int ret = 0, tmp;
+ int ret = 0;
/* Filter button events out if HOLD button is pressed at firmware/ level */
if(button_hold())
return 0;
- tmp = (~REG_GPIO_PXPIN(3)) & BTN_MASK;
+#ifndef ONDA_VX777
+ int tmp = (~REG_GPIO_PXPIN(3)) & BTN_MASK;
if(tmp & BTN_VOL_DOWN)
ret |= BUTTON_VOL_DOWN;
@@ -169,6 +174,7 @@ int button_read_device(int *data)
ret |= BUTTON_MENU;
if(tmp & BTN_OFF)
ret |= BUTTON_POWER;
+#endif
if(cur_touch != 0 && pen_down)
{
@@ -176,9 +182,6 @@ int button_read_device(int *data)
if( UNLIKELY(!is_backlight_on(true)) )
*data = 0;
}
-
- if(ret & (BUTTON_VOL_DOWN|BUTTON_VOL_UP))
- touchscreen_set_mode( touchscreen_get_mode() == TOUCHSCREEN_BUTTON ? TOUCHSCREEN_POINT : TOUCHSCREEN_BUTTON);
return ret;
}