diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-08 09:47:40 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-11 16:37:17 -0400 |
commit | 2a471e288c16b91a7186a60b3fb84dd55a494c7a (patch) | |
tree | 3e746212c5fa69b59f61d19b6e29d11aa8a5e31b /apps/plugins/zxbox | |
parent | 5efaa9ef8073bb216e3dcdbb4476f2fa7c672b76 (diff) | |
download | rockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.tar.gz rockbox-2a471e288c16b91a7186a60b3fb84dd55a494c7a.zip |
New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the
shell is completely identical.
These models are rebadged versions:
* Hifiwalker H2 (== Q)
* AGPTek H3 (== K)
* Surfans F20 (== K)
Other notes:
* Significant improvements in the shared Hiby-platform launcher/loader
* SD card can theoretically be hot-swapped now
* Support external USB mass storage!
* Some consolidation of Hiby-platform targets
* Some consolidation of plugin keymaps
Todo/known issues:
* Keymaps need to be gone over properly
* Convert to HAVE_SCROLLWHEEL?
Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
Diffstat (limited to 'apps/plugins/zxbox')
-rw-r--r-- | apps/plugins/zxbox/keymaps.h | 20 | ||||
-rw-r--r-- | apps/plugins/zxbox/zxbox_keyb.c | 29 |
2 files changed, 16 insertions, 33 deletions
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index eae20e7976..6c0fac6ddf 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h | |||
@@ -266,15 +266,7 @@ | |||
266 | #define ZX_UP BUTTON_HOME | 266 | #define ZX_UP BUTTON_HOME |
267 | #define ZX_DOWN BUTTON_OPTION | 267 | #define ZX_DOWN BUTTON_OPTION |
268 | 268 | ||
269 | #elif CONFIG_KEYPAD == XDUOO_X3II_PAD | 269 | #elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD |
270 | #define ZX_SELECT BUTTON_PLAY | ||
271 | #define ZX_MENU BUTTON_POWER | ||
272 | #define ZX_LEFT BUTTON_PREV | ||
273 | #define ZX_RIGHT BUTTON_NEXT | ||
274 | #define ZX_UP BUTTON_HOME | ||
275 | #define ZX_DOWN BUTTON_OPTION | ||
276 | |||
277 | #elif CONFIG_KEYPAD == XDUOO_X20_PAD | ||
278 | #define ZX_SELECT BUTTON_PLAY | 270 | #define ZX_SELECT BUTTON_PLAY |
279 | #define ZX_MENU BUTTON_POWER | 271 | #define ZX_MENU BUTTON_POWER |
280 | #define ZX_LEFT BUTTON_PREV | 272 | #define ZX_LEFT BUTTON_PREV |
@@ -290,7 +282,7 @@ | |||
290 | #define ZX_UP BUTTON_HOME | 282 | #define ZX_UP BUTTON_HOME |
291 | #define ZX_DOWN BUTTON_OPTION | 283 | #define ZX_DOWN BUTTON_OPTION |
292 | 284 | ||
293 | #elif CONFIG_KEYPAD == IHIFI_770_PAD | 285 | #elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD |
294 | #define ZX_SELECT BUTTON_PLAY | 286 | #define ZX_SELECT BUTTON_PLAY |
295 | #define ZX_MENU BUTTON_POWER | 287 | #define ZX_MENU BUTTON_POWER |
296 | #define ZX_LEFT BUTTON_HOME | 288 | #define ZX_LEFT BUTTON_HOME |
@@ -298,11 +290,11 @@ | |||
298 | #define ZX_UP BUTTON_PREV | 290 | #define ZX_UP BUTTON_PREV |
299 | #define ZX_DOWN BUTTON_NEXT | 291 | #define ZX_DOWN BUTTON_NEXT |
300 | 292 | ||
301 | #elif CONFIG_KEYPAD == IHIFI_800_PAD | 293 | #elif CONFIG_KEYPAD == EROSQ_PAD |
302 | #define ZX_SELECT BUTTON_PLAY | 294 | #define ZX_SELECT BUTTON_PLAY |
303 | #define ZX_MENU BUTTON_POWER | 295 | #define ZX_MENU BUTTON_MENU |
304 | #define ZX_LEFT BUTTON_HOME | 296 | #define ZX_LEFT BUTTON_SCROLL_BACK |
305 | #define ZX_RIGHT BUTTON_VOL_DOWN | 297 | #define ZX_RIGHT BUTTON_SCROLL_FWD |
306 | #define ZX_UP BUTTON_PREV | 298 | #define ZX_UP BUTTON_PREV |
307 | #define ZX_DOWN BUTTON_NEXT | 299 | #define ZX_DOWN BUTTON_NEXT |
308 | 300 | ||
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index c16c3cd20a..f77ce538d1 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | /* TODO: Check keyboard mappings */ | 37 | /* TODO: Check keyboard mappings */ |
38 | 38 | ||
39 | #define KBD_SELECT BUTTON_SELECT | 39 | #define KBD_SELECT BUTTON_SELECT |
40 | #define KBD_ABORT BUTTON_PLAY | 40 | #define KBD_ABORT BUTTON_PLAY |
41 | #define KBD_LEFT BUTTON_LEFT | 41 | #define KBD_LEFT BUTTON_LEFT |
42 | #define KBD_RIGHT BUTTON_RIGHT | 42 | #define KBD_RIGHT BUTTON_RIGHT |
@@ -257,16 +257,7 @@ | |||
257 | #define KBD_UP BUTTON_HOME | 257 | #define KBD_UP BUTTON_HOME |
258 | #define KBD_DOWN BUTTON_OPTION | 258 | #define KBD_DOWN BUTTON_OPTION |
259 | 259 | ||
260 | #elif CONFIG_KEYPAD == XDUOO_X3II_PAD | 260 | #elif CONFIG_KEYPAD == XDUOO_X3II_PAD || CONFIG_KEYPAD == XDUOO_X20_PAD |
261 | |||
262 | #define KBD_SELECT BUTTON_PLAY | ||
263 | #define KBD_ABORT BUTTON_POWER | ||
264 | #define KBD_LEFT BUTTON_PREV | ||
265 | #define KBD_RIGHT BUTTON_NEXT | ||
266 | #define KBD_UP BUTTON_HOME | ||
267 | #define KBD_DOWN BUTTON_OPTION | ||
268 | |||
269 | #elif CONFIG_KEYPAD == XDUOO_X20_PAD | ||
270 | 261 | ||
271 | #define KBD_SELECT BUTTON_PLAY | 262 | #define KBD_SELECT BUTTON_PLAY |
272 | #define KBD_ABORT BUTTON_POWER | 263 | #define KBD_ABORT BUTTON_POWER |
@@ -284,7 +275,7 @@ | |||
284 | #define KBD_UP BUTTON_HOME | 275 | #define KBD_UP BUTTON_HOME |
285 | #define KBD_DOWN BUTTON_OPTION | 276 | #define KBD_DOWN BUTTON_OPTION |
286 | 277 | ||
287 | #elif CONFIG_KEYPAD == IHIFI_770_PAD | 278 | #elif CONFIG_KEYPAD == IHIFI_770_PAD || CONFIG_KEYPAD == IHIFI_800_PAD |
288 | 279 | ||
289 | #define KBD_SELECT BUTTON_PLAY | 280 | #define KBD_SELECT BUTTON_PLAY |
290 | #define KBD_ABORT BUTTON_POWER | 281 | #define KBD_ABORT BUTTON_POWER |
@@ -293,12 +284,12 @@ | |||
293 | #define KBD_UP BUTTON_PREV | 284 | #define KBD_UP BUTTON_PREV |
294 | #define KBD_DOWN BUTTON_NEXT | 285 | #define KBD_DOWN BUTTON_NEXT |
295 | 286 | ||
296 | #elif CONFIG_KEYPAD == IHIFI_800_PAD | 287 | #elif CONFIG_KEYPAD == EROSQ_PAD |
297 | 288 | ||
298 | #define KBD_SELECT BUTTON_PLAY | 289 | #define KBD_SELECT BUTTON_PLAY |
299 | #define KBD_ABORT BUTTON_POWER | 290 | #define KBD_ABORT BUTTON_BACK |
300 | #define KBD_LEFT BUTTON_HOME | 291 | #define KBD_LEFT BUTTON_SCROLL_BACK |
301 | #define KBD_RIGHT BUTTON_VOL_DOWN | 292 | #define KBD_RIGHT BUTTON_SCROLL_FWD |
302 | #define KBD_UP BUTTON_PREV | 293 | #define KBD_UP BUTTON_PREV |
303 | #define KBD_DOWN BUTTON_NEXT | 294 | #define KBD_DOWN BUTTON_NEXT |
304 | 295 | ||
@@ -581,7 +572,7 @@ int zx_kbd_input(char* text/*, int buflen*/) | |||
581 | } | 572 | } |
582 | cur_blink = !cur_blink; | 573 | cur_blink = !cur_blink; |
583 | 574 | ||
584 | 575 | ||
585 | /* highlight the key that has focus */ | 576 | /* highlight the key that has focus */ |
586 | FOR_NB_SCREENS(l) | 577 | FOR_NB_SCREENS(l) |
587 | { | 578 | { |
@@ -591,7 +582,7 @@ int zx_kbd_input(char* text/*, int buflen*/) | |||
591 | param[l].font_w, param[l].font_h); | 582 | param[l].font_w, param[l].font_h); |
592 | rb->screens[l]->set_drawmode(DRMODE_SOLID); | 583 | rb->screens[l]->set_drawmode(DRMODE_SOLID); |
593 | } | 584 | } |
594 | 585 | ||
595 | FOR_NB_SCREENS(l) | 586 | FOR_NB_SCREENS(l) |
596 | rb->screens[l]->update(); | 587 | rb->screens[l]->update(); |
597 | 588 | ||
@@ -687,7 +678,7 @@ int zx_kbd_input(char* text/*, int buflen*/) | |||
687 | char_screen = 0; | 678 | char_screen = 0; |
688 | 679 | ||
689 | /* inserts the selected char */ | 680 | /* inserts the selected char */ |
690 | 681 | ||
691 | /* find input char */ | 682 | /* find input char */ |
692 | k = (param[char_screen].page*param[char_screen].lines + | 683 | k = (param[char_screen].page*param[char_screen].lines + |
693 | param[char_screen].y)*param[char_screen].max_chars + | 684 | param[char_screen].y)*param[char_screen].max_chars + |