From 73792b474edbdd4be999d4827a5dfaa03a0d4a4d Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Wed, 15 Sep 2004 07:03:11 +0000 Subject: Ondio levels adjusted, use ADC channel names git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5074 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/button.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'firmware/drivers/button.c') diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 5b222e8a5b..f934052746 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -483,19 +483,19 @@ void button_init(void) static int button_read(void) { int btn = BUTTON_NONE; - int data = adc_read(4); + int data = adc_read(ADC_BUTTON_ROW1); - if(adc_read(2) > 0x200) /* active high */ + if(adc_read(ADC_BUTTON_OPTION) > 0x200) /* active high */ btn |= BUTTON_MENU; - if(adc_read(3) < 0x200) /* active low */ + if(adc_read(ADC_BUTTON_ONOFF) < 0x120) /* active low */ btn |= BUTTON_ON; /* Check the 4 direction keys, hard-coded analog limits for now */ - if (data >= 0x2E5) + if (data >= 0x2EF) btn |= BUTTON_LEFT; - else if (data >= 0x23F) + else if (data >= 0x246) btn |= BUTTON_RIGHT; - else if (data >= 0x197) + else if (data >= 0x19D) btn |= BUTTON_PLAY | BUTTON_UP; else if (data >= 0x0A1) btn |= BUTTON_STOP | BUTTON_DOWN; -- cgit v1.2.3