summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/adc.c2
-rw-r--r--firmware/drivers/button.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/firmware/drivers/adc.c b/firmware/drivers/adc.c
index 1ebac06..d00f899 100644
--- a/firmware/drivers/adc.c
+++ b/firmware/drivers/adc.c
@@ -123,6 +123,7 @@ static int channelnum[] =
unsigned short adc_scan(int channel)
{
+ int level = set_irq_level(HIGHEST_IRQ_LEVEL);
unsigned char data;
pcf50606_write(0x2f, 0x80 | (channelnum[channel] << 1) | 1);
@@ -130,6 +131,7 @@ unsigned short adc_scan(int channel)
adcdata[channel] = data;
+ set_irq_level(level);
return data;
}
#else
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index f31ab33..5e6f6b4 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -845,6 +845,7 @@ static int button_read(void)
static int prev_data = 0xff;
static int last_valid = 0xff;
bool hold_button_old;
+ bool remote_hold_button_old;
/* normal buttons */
hold_button_old = hold_button;
@@ -916,12 +917,13 @@ static int button_read(void)
}
/* remote buttons */
+ remote_hold_button_old = remote_hold_button;
remote_hold_button = remote_button_hold_only();
- if (remote_hold_button && !remote_button_hold_only())
- {
- remote_backlight_on();
- }
+#ifndef BOOTLOADER
+ if (remote_hold_button != remote_hold_button_old)
+ remote_backlight_hold_changed(remote_hold_button);
+#endif
if (!remote_hold_button)
{