diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 10:24:28 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 10:24:28 +0000 |
commit | 29361abf744ed116cec04ca03e754ddd2794b76c (patch) | |
tree | d336dd19570faed037aef9064ce3c490c50ed6df /apps/plugins/battery_bench.c | |
parent | bca8edd856cee3a3b469ef9fe2770a191b590fde (diff) | |
download | rockbox-29361abf744ed116cec04ca03e754ddd2794b76c.tar.gz rockbox-29361abf744ed116cec04ca03e754ddd2794b76c.zip |
Adapt most single-file plugins to the M3 keypad and screen. It's still preliminary, as many plugins now can't be left without the remote. The plugins need to be converted to use the action API (but not pluginlib actions). Plugins are not enabled yet. * Simplify the bitmap handling in the source of some plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16737 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/battery_bench.c')
-rw-r--r-- | apps/plugins/battery_bench.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 658dfca0ec..6b52a4d489 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -135,6 +135,15 @@ PLUGIN_HEADER | |||
135 | #define BATTERY_ON_TXT "SELECT - start" | 135 | #define BATTERY_ON_TXT "SELECT - start" |
136 | #define BATTERY_OFF_TXT "POWER - quit" | 136 | #define BATTERY_OFF_TXT "POWER - quit" |
137 | 137 | ||
138 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
139 | |||
140 | #define BATTERY_ON BUTTON_PLAY | ||
141 | #define BATTERY_OFF BUTTON_REC | ||
142 | #define BATTERY_RC_ON BUTTON_RC_PLAY | ||
143 | #define BATTERY_RC_OFF BUTTON_RC_REC | ||
144 | #define BATTERY_ON_TXT "PLAY - start" | ||
145 | #define BATTERY_OFF_TXT "REC - quit" | ||
146 | |||
138 | #else | 147 | #else |
139 | #error No keymap defined! | 148 | #error No keymap defined! |
140 | #endif | 149 | #endif |
@@ -231,7 +240,7 @@ void thread(void) | |||
231 | int fd, buffelements, tick = 1, i = 0, skipped = 0, exit = 0; | 240 | int fd, buffelements, tick = 1, i = 0, skipped = 0, exit = 0; |
232 | int fst = 0, lst = 0; /* first and last skipped tick */ | 241 | int fst = 0, lst = 0; /* first and last skipped tick */ |
233 | unsigned int last_voltage = 0; | 242 | unsigned int last_voltage = 0; |
234 | #if CONFIG_CHARGING || defined(HAVE_USB_POWER) | 243 | #if CONFIG_CHARGING || defined(HAVE_USB_POWER) |
235 | unsigned int last_state = 0; | 244 | unsigned int last_state = 0; |
236 | #endif | 245 | #endif |
237 | long sleep_time = 5 * HZ; | 246 | long sleep_time = 5 * HZ; |