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 c43d1884f4..790d8aa634 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-meg-fx.c @@ -119,20 +119,7 @@ int button_read_device(void) buttons = GPGDAT & 0x1F; if (buttons) { - if (buttons & (1 << 0)) - btn |= BUTTON_POWER; - - if (buttons & (1 << 1)) - btn |= BUTTON_MENU; - - if (buttons & (1 << 2)) - btn |= BUTTON_VOL_UP; - - if (buttons & (1 << 3)) - btn |= BUTTON_VOL_DOWN; - - if (buttons & (1 << 4)) - btn |= BUTTON_A; + btn |= buttons; buttonlight_on(); } diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h index a5876aadde..6d2d6c084b 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h +++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h @@ -33,17 +33,16 @@ void touchpad_set_sensitivity(int level); #define BUTTON_POWER 0x00000001 #define BUTTON_MENU 0x00000002 +#define BUTTON_VOL_UP 0x00000004 +#define BUTTON_VOL_DOWN 0x00000008 +#define BUTTON_A 0x00000010 -#define BUTTON_LEFT 0x00000004 -#define BUTTON_RIGHT 0x00000008 -#define BUTTON_UP 0x00000010 -#define BUTTON_DOWN 0x00000020 +#define BUTTON_LEFT 0x00000020 +#define BUTTON_RIGHT 0x00000040 +#define BUTTON_UP 0x00000080 +#define BUTTON_DOWN 0x00000100 -#define BUTTON_VOL_UP 0x00000040 -#define BUTTON_VOL_DOWN 0x00000080 - -#define BUTTON_SELECT 0x00000100 -#define BUTTON_A 0x00000200 +#define BUTTON_SELECT 0x00000200 /* Remote control buttons */