summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-02-03 23:56:25 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-02-03 23:56:25 +0000
commitfacfec0c7737b57cdaf6ef7e80d9b43571e975f1 (patch)
tree40d4ca9958a0dba522ff487f202191d2ade97767
parentf4489561693708093c6145777e70db07a65ec0e0 (diff)
downloadrockbox-facfec0c7737b57cdaf6ef7e80d9b43571e975f1.tar.gz
rockbox-facfec0c7737b57cdaf6ef7e80d9b43571e975f1.zip
give plugins access to ata_sleep(), useful for my next video player
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4292 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index e010ebe841..08c98017e1 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -37,6 +37,7 @@
37#include "buffer.h" 37#include "buffer.h"
38#include "mp3_playback.h" 38#include "mp3_playback.h"
39#include "backlight.h" 39#include "backlight.h"
40#include "ata.h"
40 41
41#ifdef HAVE_LCD_BITMAP 42#ifdef HAVE_LCD_BITMAP
42#include "widgets.h" 43#include "widgets.h"
@@ -180,6 +181,9 @@ static struct plugin_api rockbox_api = {
180#endif 181#endif
181 &global_settings, 182 &global_settings,
182 backlight_set_timeout, 183 backlight_set_timeout,
184#ifndef SIMULATOR
185 ata_sleep,
186#endif
183}; 187};
184 188
185int plugin_load(char* plugin, void* parameter) 189int plugin_load(char* plugin, void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index 2bcdffb344..8682deb60e 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -45,10 +45,11 @@
45#include "settings.h" 45#include "settings.h"
46 46
47/* increase this every time the api struct changes */ 47/* increase this every time the api struct changes */
48#define PLUGIN_API_VERSION 10 48#define PLUGIN_API_VERSION 11
49 49
50/* update this to latest version if a change to the api struct breaks 50/* update this to latest version if a change to the api struct breaks
51 backwards compatibility */ 51 backwards compatibility (and please take the opportunity to sort in any
52 new function which are "waiting" at the end of the function table) */
52#define PLUGIN_MIN_API_VERSION 9 53#define PLUGIN_MIN_API_VERSION 9
53 54
54/* plugin return codes */ 55/* plugin return codes */
@@ -187,7 +188,6 @@ struct plugin_api {
187 /* new stuff, sort in next time the API gets broken! */ 188 /* new stuff, sort in next time the API gets broken! */
188#ifndef HAVE_LCD_CHARCELLS 189#ifndef HAVE_LCD_CHARCELLS
189 unsigned char* lcd_framebuffer; 190 unsigned char* lcd_framebuffer;
190 /* performance function */
191 void (*lcd_blit) (unsigned char* p_data, int x, int y, int width, int height, int stride); 191 void (*lcd_blit) (unsigned char* p_data, int x, int y, int width, int height, int stride);
192#endif 192#endif
193 void (*yield)(void); 193 void (*yield)(void);
@@ -204,6 +204,9 @@ struct plugin_api {
204#endif 204#endif
205 struct user_settings* global_settings; 205 struct user_settings* global_settings;
206 void (*backlight_set_timeout)(int index); 206 void (*backlight_set_timeout)(int index);
207#ifndef SIMULATOR
208 void (*ata_sleep)(void);
209#endif
207}; 210};
208 211
209/* defined by the plugin loader (plugin.c) */ 212/* defined by the plugin loader (plugin.c) */