diff options
author | Hristo Kovachev <bger@rockbox.org> | 2006-03-21 09:36:13 +0000 |
---|---|---|
committer | Hristo Kovachev <bger@rockbox.org> | 2006-03-21 09:36:13 +0000 |
commit | f53f64a6159c0f17f09d18fad64ab2b09f7c0d36 (patch) | |
tree | 9e6cc6c2628fdf70b1d555ad589f25d8440acc33 /apps/plugin.c | |
parent | 16f7aa76d049681f1aa3b3ca778b1d2be77d2231 (diff) |
button.h cleanup, with the future "button action" thing in mind:
1) Main unit's button defines are from the LSB to the MSB (currently bits 0-9, 0x00000200), remote ones are from the 20th bit (0x00100000) downards to 10th(0x00000400);
2) Removed the BUTTON_REMOTE modifier, replaced with a bitmask of all of the remote buttons (where applicable, otherwise with 0), added a complementary BUTTON_MAIN bitmask;
3) Moved button modifiers:
- BUTTON_REPEAT: to bit 26 (0x04000000)
- BUTTON_REL: to bit 25 (0x02000000)
There are at least 4 bits free on all targets now: 21-24.
If we really need more free bits, it's possible to SHR remote buttons 1 bit more (freeing bit 20 too), and to change the SYS_EVENT bit with a bitmask (+2 bits).
4) Bumped up the min. plugin ver. (and sorted the plugin api struct), because the binary plugins with key input won't understand the new values
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9149 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 7aa30c9ea2..4395195d0f 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -179,7 +179,7 @@ static const struct plugin_api rockbox_api = { button_get_w_tmo, button_status, button_clear_queue, -#if CONFIG_KEYPAD == IRIVER_H100_PAD +#ifdef HAS_BUTTON_HOLD button_hold, #endif @@ -357,6 +357,7 @@ static const struct plugin_api rockbox_api = { menu_draw, menu_insert, menu_set_cursor, + set_option, /* power */ battery_level, @@ -411,13 +412,6 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ -#if CONFIG_KEYPAD == IRIVER_H300_PAD || CONFIG_KEYPAD == IPOD_4G_PAD - /* NOTE: This is already in the plugin api for the H100 - but we put it - at the end for other targets to keep the plugin api compatible */ - button_hold, -#endif - /* options */ - set_option, }; int plugin_load(const char* plugin, void* parameter) |