summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-07-13 22:15:19 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-07-13 22:15:19 +0000
commit13d56150b6678841a67cdca5acbb484814e78ce7 (patch)
tree0b20688a008f0037301f31945fcd5ad43b946d28 /apps/plugin.h
parent9cb5e0e9f94e0660682f35b7ae2d55a82f009f03 (diff)
downloadrockbox-13d56150b6678841a67cdca5acbb484814e78ce7.tar.gz
rockbox-13d56150b6678841a67cdca5acbb484814e78ce7.zip
Added plugin support for 8MB-modified units. This bumps the plugin API version number again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 12953ebc4d..dab3320b2a 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -25,6 +25,10 @@
25#define NO_REDEFINES_PLEASE 25#define NO_REDEFINES_PLEASE
26#endif 26#endif
27 27
28#ifndef MEM
29#define MEM 2
30#endif
31
28#include <stdbool.h> 32#include <stdbool.h>
29#include <stdio.h> 33#include <stdio.h>
30#include <stdlib.h> 34#include <stdlib.h>
@@ -37,7 +41,7 @@
37#include "lcd.h" 41#include "lcd.h"
38 42
39/* increase this every time the api struct changes */ 43/* increase this every time the api struct changes */
40#define PLUGIN_API_VERSION 3 44#define PLUGIN_API_VERSION 4
41 45
42/* plugin return codes */ 46/* plugin return codes */
43enum plugin_status { 47enum plugin_status {
@@ -64,7 +68,7 @@ enum model {
64/* compatibility test macro */ 68/* compatibility test macro */
65#define TEST_PLUGIN_API(_api_) \ 69#define TEST_PLUGIN_API(_api_) \
66do { \ 70do { \
67 int _rc_ = _api_->plugin_test(PLUGIN_API_VERSION, MODEL); \ 71 int _rc_ = _api_->plugin_test(PLUGIN_API_VERSION, MODEL, MEM); \
68 if (_rc_<0) \ 72 if (_rc_<0) \
69 return _rc_; \ 73 return _rc_; \
70} while(0) 74} while(0)
@@ -73,7 +77,7 @@ struct plugin_api {
73 /* these two fields must always be first, to ensure 77 /* these two fields must always be first, to ensure
74 TEST_PLUGIN_API will always work */ 78 TEST_PLUGIN_API will always work */
75 int version; 79 int version;
76 int (*plugin_test)(int api_version, int model); 80 int (*plugin_test)(int api_version, int model, int memsize);
77 81
78 /* lcd */ 82 /* lcd */
79 void (*lcd_clear_display)(void); 83 void (*lcd_clear_display)(void);