summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-03-27 14:42:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-03-27 14:43:17 -0400
commitc96dc1c886b9737a3886961212fabab76551919f (patch)
tree18fba7ae10dd887024e1c72af6d29b11ee302273
parentea1aef9b82c91f93eb0bacccab7b213c374f18f5 (diff)
downloadrockbox-c96dc1c886b9737a3886961212fabab76551919f.tar.gz
rockbox-c96dc1c886b9737a3886961212fabab76551919f.zip
xduoox3ii: Wrap the remote key detection in USE_REMOTE
Makes it straightforward to disable for debugging or defective hardware Change-Id: Ie72786f6e9eabf396a05ef8a02e422c34c97691a
-rw-r--r--firmware/target/hosted/xduoo/button-xduoo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c
index 2daa7da16b..568ad2614d 100644
--- a/firmware/target/hosted/xduoo/button-xduoo.c
+++ b/firmware/target/hosted/xduoo/button-xduoo.c
@@ -26,6 +26,8 @@
26#include "kernel.h" 26#include "kernel.h"
27#include "xduoolinux_codec.h" 27#include "xduoolinux_codec.h"
28 28
29#define USE_REMOTE /* Comment out to disable headphone remote */
30
29int button_map(int keycode) 31int button_map(int keycode)
30{ 32{
31 switch(keycode) 33 switch(keycode)
@@ -54,7 +56,7 @@ int button_map(int keycode)
54 case KEY_POWER: 56 case KEY_POWER:
55 return BUTTON_POWER; 57 return BUTTON_POWER;
56 58
57#if defined(XDUOO_X3II) /* Headphone remote */ 59#if defined(XDUOO_X3II) && defined(USE_REMOTE) /* Headphone remote */
58 case KEY_NEXTSONG: 60 case KEY_NEXTSONG:
59 return (BUTTON_NEXT | BUTTON_DELAY_RELEASE); 61 return (BUTTON_NEXT | BUTTON_DELAY_RELEASE);
60 62