From 275d960b04ea74f45e97331408644c4ec4be6d8f Mon Sep 17 00:00:00 2001 From: Robert Kukla Date: Sat, 19 Dec 2009 19:37:06 +0000 Subject: [PATCH] FS#8286 - utilise the buttons on the gigabeat cradle git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24080 a1c6a512-1295-4272-9138-f99709370657 --- .../target/arm/s3c2440/gigabeat-fx/button-meg-fx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c index 0e69cbd420..55fdad1159 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c @@ -155,6 +155,18 @@ int button_read_device(void) buttonlight_on(); } + /* the cradle buttons */ + buttons = ~GPFDAT & 0xc0; + if (buttons) + { + if (buttons & (1 << 6)) + btn |= BUTTON_A; + + if (buttons & (1 << 7)) + btn |= BUTTON_POWER; + buttonlight_on(); + } + return btn; }