summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index e5f12b5749..1a0aeceb06 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -123,7 +123,10 @@ static void button_tick(void)
123 which doesn't shut down easily with the OFF 123 which doesn't shut down easily with the OFF
124 key */ 124 key */
125#ifdef HAVE_SW_POWEROFF 125#ifdef HAVE_SW_POWEROFF
126 if (btn == BUTTON_OFF && !charger_inserted() && 126 if (btn == BUTTON_OFF &&
127#ifndef IRIVER_H100
128 !charger_inserted() &&
129#endif
127 repeat_count > POWEROFF_COUNT) 130 repeat_count > POWEROFF_COUNT)
128 queue_post(&button_queue, SYS_POWEROFF, NULL); 131 queue_post(&button_queue, SYS_POWEROFF, NULL);
129#endif 132#endif
@@ -378,6 +381,9 @@ static int button_read(void)
378 if ((data & 0x20) == 0) 381 if ((data & 0x20) == 0)
379 btn |= BUTTON_ON; 382 btn |= BUTTON_ON;
380 383
384 if ((data & 0x40) == 0)
385 btn |= BUTTON_RC_ON;
386
381#elif CONFIG_KEYPAD == RECORDER_PAD 387#elif CONFIG_KEYPAD == RECORDER_PAD
382 388
383#ifdef HAVE_FMADC 389#ifdef HAVE_FMADC
@@ -508,6 +514,11 @@ bool button_hold(void)
508{ 514{
509 return (GPIO1_READ & 0x00000002)?true:false; 515 return (GPIO1_READ & 0x00000002)?true:false;
510} 516}
517
518bool remote_button_hold(void)
519{
520 return (GPIO1_READ & 0x00100000)?true:false;
521}
511#endif 522#endif
512 523
513int button_status(void) 524int button_status(void)