summaryrefslogtreecommitdiff
path: root/firmware/drivers/adc.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/adc.c')
-rw-r--r--firmware/drivers/adc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/drivers/adc.c b/firmware/drivers/adc.c
index 1ebac066e7..d00f89958a 100644
--- a/firmware/drivers/adc.c
+++ b/firmware/drivers/adc.c
@@ -123,6 +123,7 @@ static int channelnum[] =
123 123
124unsigned short adc_scan(int channel) 124unsigned short adc_scan(int channel)
125{ 125{
126 int level = set_irq_level(HIGHEST_IRQ_LEVEL);
126 unsigned char data; 127 unsigned char data;
127 128
128 pcf50606_write(0x2f, 0x80 | (channelnum[channel] << 1) | 1); 129 pcf50606_write(0x2f, 0x80 | (channelnum[channel] << 1) | 1);
@@ -130,6 +131,7 @@ unsigned short adc_scan(int channel)
130 131
131 adcdata[channel] = data; 132 adcdata[channel] = data;
132 133
134 set_irq_level(level);
133 return data; 135 return data;
134} 136}
135#else 137#else