From c4a0d45d36cf093425146c93c25c8f97df87a854 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 28 Oct 2006 23:10:45 +0000 Subject: Cleanup of new button reading code. Moved functions for enabling of scanning and the decision to scan or not to button_read_device. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11377 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/coldfire/iaudio/x5/adc-x5.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'firmware/target/coldfire/iaudio/x5/adc-x5.c') diff --git a/firmware/target/coldfire/iaudio/x5/adc-x5.c b/firmware/target/coldfire/iaudio/x5/adc-x5.c index c923951e31..72aec7d547 100755 --- a/firmware/target/coldfire/iaudio/x5/adc-x5.c +++ b/firmware/target/coldfire/iaudio/x5/adc-x5.c @@ -33,37 +33,11 @@ static const int adcc2_parms[] = [ADC_BATTERY] = 0x80 | (0 << 1) | 1, /* BATVOLT, resistive divider */ }; -/* have buttons scan by default */ -static volatile bool button_scan_on = true; - -void adc_enable_button_scan(bool enable) -{ - button_scan_on = enable; -} - -bool adc_get_button_scan_enabled(void) -{ - return button_scan_on; -} - unsigned short adc_scan(int channel) { int level; unsigned char data; - if (channel == ADC_BUTTONS) - { - /* no button scan if nothing pushed */ - if (!button_scan_on) - return adcdata[channel] = 0xff; - } - else if (channel == ADC_REMOTE) - { - /* no remote scan if not plugged */ - if (GPIO_READ & 0x01000000) - return adcdata[channel] = 0xff; - } - level = set_irq_level(HIGHEST_IRQ_LEVEL); pcf50606_write(0x2f, adcc2_parms[channel]); -- cgit v1.2.3