summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-h100-remote.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index 0592f60..e366906 100644
--- a/firmware/drivers/lcd-h100-remote.c
+++ b/firmware/drivers/lcd-h100-remote.c
@@ -484,6 +484,11 @@ static void remote_lcd_init(void)
lcd_remote_set_invert_display(cached_invert);
}
+bool remote_detect(void)
+{
+ return (GPIO_READ & 0x40000000)?false:true;
+}
+
int remote_type(void)
{
return _remote_type;
@@ -499,7 +504,7 @@ static void remote_tick(void)
int val;
int level;
- current_status = ((GPIO_READ & 0x40000000) == 0);
+ current_status = remote_detect();
/* Only report when the status has changed */
if (current_status != last_status)
{