summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/olympus/mrobe-100/button-mr100.c
diff options
context:
space:
mode:
authorRobert Kukla <roolku@rockbox.org>2008-01-10 21:51:44 +0000
committerRobert Kukla <roolku@rockbox.org>2008-01-10 21:51:44 +0000
commit12cc3cc47cf4820a323fabf9815076705b9dd8fb (patch)
treee6962c332bfc3232353e2e191bde275afc504142 /firmware/target/arm/olympus/mrobe-100/button-mr100.c
parentea5d196c7bf6aad50c875841b9369bb192b8fa06 (diff)
downloadrockbox-12cc3cc47cf4820a323fabf9815076705b9dd8fb.tar.gz
rockbox-12cc3cc47cf4820a323fabf9815076705b9dd8fb.zip
mrobe 100:
- temporarily disable shutdown on low power - enable power button for minimal interaction (not shutdown yet) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16049 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-100/button-mr100.c')
-rw-r--r--firmware/target/arm/olympus/mrobe-100/button-mr100.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/button-mr100.c b/firmware/target/arm/olympus/mrobe-100/button-mr100.c
index 141a6d5b0c..49561cb8d7 100644
--- a/firmware/target/arm/olympus/mrobe-100/button-mr100.c
+++ b/firmware/target/arm/olympus/mrobe-100/button-mr100.c
@@ -27,10 +27,6 @@
#include "backlight-target.h"
#include "system.h"
-void button_int(void)
-{
-}
-
void button_init_device(void)
{
/* taken from the mr-100 bootloader (offset 0x1e72) */
@@ -46,12 +42,17 @@ void button_init_device(void)
*/
int button_read_device(void)
{
- return BUTTON_NONE;
+ int btn = BUTTON_NONE;
+
+ if(~GPIOA_INPUT_VAL & 0x40)
+ btn |= BUTTON_POWER;
+
+ return btn;
}
bool button_hold(void)
{
- return (GPIOD_INPUT_VAL & BUTTON_HOLD) ? false : true;
+ return (GPIOD_INPUT_VAL & 0x10) ? false : true;
}
bool headphones_inserted(void)