summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-09-05 11:26:48 -0400
committerSolomon Peachy <pizza@shaftnet.org>2018-09-20 19:38:58 -0400
commita26c1c14599e0f67674c58b214ff9901fe7169ed (patch)
tree432e8763ec942b4e3ef8a4b2a24183ba8d860b31 /firmware/target
parent640ada038954a97ff73a863e84672c00fe358649 (diff)
downloadrockbox-a26c1c14599e0f67674c58b214ff9901fe7169ed.tar.gz
rockbox-a26c1c14599e0f67674c58b214ff9901fe7169ed.tar.bz2
rockbox-a26c1c14599e0f67674c58b214ff9901fe7169ed.zip
xduoo_x3: Disable keypress IRQ since we poll for keypresses.
Change-Id: Ieab5f864751cf798b62c4e89e670acf7ade756ab
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
index d4a3548305..16d5aab782 100644
--- a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
+++ b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c
@@ -62,9 +62,12 @@ void button_init_device(void)
__gpio_disable_pull(PIN_BTN_POWER);
__gpio_disable_pull(PIN_BTN_HOLD);
-
+
+#if 0
+ /* We poll this, no need to set it up for an interrupt */
__gpio_as_irq_fall_edge(PIN_KEY_INT);
system_enable_irq(GPIO_IRQ(PIN_KEY_INT));
+#endif
__gpio_set_pin(PIN_CHARGE_CON); /* 0.7 A */
__gpio_as_output(PIN_CHARGE_CON);
@@ -85,7 +88,7 @@ int button_read_device(void)
{
static bool hold_button = false;
bool hold_button_old;
-
+
hold_button_old = hold_button;
hold_button = (__gpio_get_pin(PIN_BTN_HOLD) ? true : false);
@@ -127,7 +130,7 @@ int button_read_device(void)
else
if (key_val < 2600)
btn |= BUTTON_HOME;
-
+
return btn;
}
@@ -202,7 +205,7 @@ void SADC(void)
sadcstate = REG_SADC_ADSTATE;
state = REG_SADC_ADSTATE & (~REG_SADC_ADCTRL);
REG_SADC_ADSTATE &= sadcstate;
-
+
if(state & ADCTRL_ARDYM)
{
key_val = REG_SADC_ADADAT;