diff options
Diffstat (limited to 'apps/plugins/helloworld.c')
-rw-r--r-- | apps/plugins/helloworld.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/plugins/helloworld.c b/apps/plugins/helloworld.c index d0fecba169..e4220e4af3 100644 --- a/apps/plugins/helloworld.c +++ b/apps/plugins/helloworld.c | |||
@@ -20,6 +20,10 @@ | |||
20 | 20 | ||
21 | /* welcome to the example rockbox plugin */ | 21 | /* welcome to the example rockbox plugin */ |
22 | 22 | ||
23 | /* This macros must always be included. Should be placed at the top by | ||
24 | convention, although the actual position doesn't matter */ | ||
25 | PLUGIN_HEADER | ||
26 | |||
23 | /* here is a global api struct pointer. while not strictly necessary, | 27 | /* here is a global api struct pointer. while not strictly necessary, |
24 | it's nice not to have to pass the api pointer in all function calls | 28 | it's nice not to have to pass the api pointer in all function calls |
25 | in the plugin */ | 29 | in the plugin */ |
@@ -28,11 +32,6 @@ static struct plugin_api* rb; | |||
28 | /* this is the plugin entry point */ | 32 | /* this is the plugin entry point */ |
29 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | 33 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) |
30 | { | 34 | { |
31 | /* this macro should be called as the first thing you do in the plugin. | ||
32 | it test that the api version and model the plugin was compiled for | ||
33 | matches the machine it is running on */ | ||
34 | TEST_PLUGIN_API(api); | ||
35 | |||
36 | /* if you don't use the parameter, you can do like | 35 | /* if you don't use the parameter, you can do like |
37 | this to avoid the compiler warning about it */ | 36 | this to avoid the compiler warning about it */ |
38 | (void)parameter; | 37 | (void)parameter; |