summaryrefslogtreecommitdiff
path: root/apps/plugins/metronome.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-06-13 15:35:07 +0000
committerNils Wallménius <nils@rockbox.org>2007-06-13 15:35:07 +0000
commitc7f9ca4067f26ba3d0471d50ed3f06b047171b50 (patch)
tree9bfaf2d5019c075ad97540a2beed8d68277ca021 /apps/plugins/metronome.c
parentf50bd1151a65b1aeefaeab545187fba29881b800 (diff)
downloadrockbox-c7f9ca4067f26ba3d0471d50ed3f06b047171b50.tar.gz
rockbox-c7f9ca4067f26ba3d0471d50ed3f06b047171b50.zip
Accept FS#7264 'Build with -Os switch for coldfire targets'.
Introduces MEM_FUNCTION_WRAPPERS(api) macro which adds wrappers functions to a plugin to make plugins link correctly when gcc calls mem* functions directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13625 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/metronome.c')
-rw-r--r--apps/plugins/metronome.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 19a37a580a..daf3294b75 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -18,6 +18,7 @@
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "plugin.h" 19#include "plugin.h"
20#include "pluginlib_actions.h" 20#include "pluginlib_actions.h"
21#include "mem_function_wrappers.h"
21 22
22PLUGIN_HEADER 23PLUGIN_HEADER
23 24
@@ -70,6 +71,8 @@ static const struct button_mapping iriver_syncaction[] =
70 71
71static struct plugin_api* rb; 72static struct plugin_api* rb;
72 73
74MEM_FUNCTION_WRAPPERS(rb);
75
73static int bpm = 120; 76static int bpm = 120;
74static int period = 0; 77static int period = 0;
75static int minitick = 0; 78static int minitick = 0;
@@ -159,7 +162,7 @@ static unsigned char sound[] = {
159 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 162 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
160 85, 85, 85}; 163 85, 85, 85};
161 164
162void callback(unsigned char** start, int* size){ 165void callback(unsigned char** start, size_t* size){
163 (void)start; /* unused parameter, avoid warning */ 166 (void)start; /* unused parameter, avoid warning */
164 *size = NULL; /* end of data */ 167 *size = NULL; /* end of data */
165 sound_active = false; 168 sound_active = false;