diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-11-12 01:22:32 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2020-11-12 01:22:32 -0500 |
commit | 1a68856f52f1b6dc89863758404e54c744fcf53a (patch) | |
tree | 7db9e2dd14eab393918e509248bceaaa3073dd48 | |
parent | 4e5499606bd34195cdee214221800a2462cdd7c1 (diff) | |
download | rockbox-1a68856f52f1b6dc89863758404e54c744fcf53a.tar.gz rockbox-1a68856f52f1b6dc89863758404e54c744fcf53a.zip |
Rocker Add WPS and Tree Hotkey, button codes in debug menu
VolUp+VolDown becomes the wps and tree (file browser) hotkey
Change-Id: I0cba96927420c318506bc0c15dabcb809cd81647
-rw-r--r-- | apps/keymaps/keymap-agptekrocker.c | 9 | ||||
-rw-r--r-- | firmware/export/config/agptekrocker.h | 3 | ||||
-rw-r--r-- | firmware/target/hosted/agptek/debug-agptek.c | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/apps/keymaps/keymap-agptekrocker.c b/apps/keymaps/keymap-agptekrocker.c index b27cb886b9..4d7139ffd5 100644 --- a/apps/keymaps/keymap-agptekrocker.c +++ b/apps/keymaps/keymap-agptekrocker.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "action.h" | 22 | #include "action.h" |
23 | #include "button.h" | 23 | #include "button.h" |
24 | #include "settings.h" | 24 | #include "settings.h" |
25 | 25 | #define BTN_VOL_COMBO (BUTTON_VOLUP | BUTTON_VOLDOWN) | |
26 | /* {Action Code, Button code, Prereq button code } */ | 26 | /* {Action Code, Button code, Prereq button code } */ |
27 | 27 | ||
28 | /* | 28 | /* |
@@ -84,6 +84,7 @@ static const struct button_mapping button_context_wps[] = { | |||
84 | */ | 84 | */ |
85 | 85 | ||
86 | { ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE }, | 86 | { ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE }, |
87 | { ACTION_WPS_HOTKEY, BTN_VOL_COMBO|BUTTON_REL, BTN_VOL_COMBO}, | ||
87 | 88 | ||
88 | LAST_ITEM_IN_LIST | 89 | LAST_ITEM_IN_LIST |
89 | }; /* button_context_wps */ | 90 | }; /* button_context_wps */ |
@@ -114,8 +115,9 @@ static const struct button_mapping button_context_list[] = { | |||
114 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 115 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
115 | }; /* button_context_list */ | 116 | }; /* button_context_list */ |
116 | 117 | ||
117 | #if 0 | 118 | |
118 | static const struct button_mapping button_context_tree[] = { | 119 | static const struct button_mapping button_context_tree[] = { |
120 | { ACTION_TREE_HOTKEY, BTN_VOL_COMBO|BUTTON_REL, BTN_VOL_COMBO}, | ||
119 | /* ACTION_TREE_ROOT_INIT, | 121 | /* ACTION_TREE_ROOT_INIT, |
120 | * ACTION_TREE_PGLEFT, optional | 122 | * ACTION_TREE_PGLEFT, optional |
121 | * ACTION_TREE_PGRIGHT, optional | 123 | * ACTION_TREE_PGRIGHT, optional |
@@ -129,7 +131,7 @@ static const struct button_mapping button_context_tree[] = { | |||
129 | */ | 131 | */ |
130 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 132 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
131 | }; /* button_context_tree */ | 133 | }; /* button_context_tree */ |
132 | #endif | 134 | |
133 | 135 | ||
134 | static const struct button_mapping button_context_yesno[] = { | 136 | static const struct button_mapping button_context_yesno[] = { |
135 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, | 137 | { ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE }, |
@@ -230,6 +232,7 @@ const struct button_mapping* get_context_mapping(int context) | |||
230 | case CONTEXT_MAINMENU: | 232 | case CONTEXT_MAINMENU: |
231 | return button_context_mainmenu; | 233 | return button_context_mainmenu; |
232 | case CONTEXT_TREE: | 234 | case CONTEXT_TREE: |
235 | return button_context_tree; | ||
233 | case CONTEXT_LIST: | 236 | case CONTEXT_LIST: |
234 | return button_context_list; | 237 | return button_context_list; |
235 | 238 | ||
diff --git a/firmware/export/config/agptekrocker.h b/firmware/export/config/agptekrocker.h index 637898aaff..42abf4e9f0 100644 --- a/firmware/export/config/agptekrocker.h +++ b/firmware/export/config/agptekrocker.h | |||
@@ -61,3 +61,6 @@ | |||
61 | 61 | ||
62 | /* Generic HiBy stuff */ | 62 | /* Generic HiBy stuff */ |
63 | #include "hibylinux.h" | 63 | #include "hibylinux.h" |
64 | |||
65 | /* Define this if a programmable hotkey is mapped */ | ||
66 | #define HAVE_HOTKEY | ||
diff --git a/firmware/target/hosted/agptek/debug-agptek.c b/firmware/target/hosted/agptek/debug-agptek.c index d0ca613323..8ef0048945 100644 --- a/firmware/target/hosted/agptek/debug-agptek.c +++ b/firmware/target/hosted/agptek/debug-agptek.c | |||
@@ -70,6 +70,7 @@ bool dbg_hw_info(void) | |||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | btn = button_read_device(); | 72 | btn = button_read_device(); |
73 | lcd_putsf(0, line++, "btn: %d", btn); | ||
73 | 74 | ||
74 | lcd_update(); | 75 | lcd_update(); |
75 | sleep(HZ/16); | 76 | sleep(HZ/16); |