summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugin.c18
-rw-r--r--apps/plugin.h24
-rw-r--r--apps/plugins/test_codec.c2
3 files changed, 19 insertions, 25 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 6c402f646b..316c7c6b5d 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -344,6 +344,7 @@ static const struct plugin_api rockbox_api = {
344 mkdir, 344 mkdir,
345 rmdir, 345 rmdir,
346 dir_exists, 346 dir_exists,
347 dir_get_info,
347 348
348 /* kernel/ system */ 349 /* kernel/ system */
349#if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE 350#if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE
@@ -384,12 +385,15 @@ static const struct plugin_api rockbox_api = {
384 trigger_cpu_boost, 385 trigger_cpu_boost,
385 cancel_cpu_boost, 386 cancel_cpu_boost,
386#endif 387#endif
387#ifdef HAVE_CPUCACHE_FLUSH 388
388 cpucache_flush, 389 cpucache_flush,
389#endif
390#ifdef HAVE_CPUCACHE_INVALIDATE
391 cpucache_invalidate, 390 cpucache_invalidate,
392#endif 391
392 lc_open,
393 lc_open_from_mem,
394 lc_get_header,
395 lc_close,
396
393 timer_register, 397 timer_register,
394 timer_unregister, 398 timer_unregister,
395 timer_set_period, 399 timer_set_period,
@@ -722,12 +726,6 @@ static const struct plugin_api rockbox_api = {
722 726
723 /* new stuff at the end, sort into place next time 727 /* new stuff at the end, sort into place next time
724 the API gets incompatible */ 728 the API gets incompatible */
725 dir_get_info,
726
727 lc_open,
728 lc_open_from_mem,
729 lc_get_header,
730 lc_close,
731}; 729};
732 730
733int plugin_load(const char* plugin, const void* parameter) 731int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index cbfc48bd08..faea8470f0 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -147,12 +147,12 @@ void* plugin_get_buffer(size_t *buffer_size);
147#define PLUGIN_MAGIC 0x526F634B /* RocK */ 147#define PLUGIN_MAGIC 0x526F634B /* RocK */
148 148
149/* increase this every time the api struct changes */ 149/* increase this every time the api struct changes */
150#define PLUGIN_API_VERSION 193 150#define PLUGIN_API_VERSION 194
151 151
152/* update this to latest version if a change to the api struct breaks 152/* update this to latest version if a change to the api struct breaks
153 backwards compatibility (and please take the opportunity to sort in any 153 backwards compatibility (and please take the opportunity to sort in any
154 new function which are "waiting" at the end of the function table) */ 154 new function which are "waiting" at the end of the function table) */
155#define PLUGIN_MIN_API_VERSION 192 155#define PLUGIN_MIN_API_VERSION 194
156 156
157/* plugin return codes */ 157/* plugin return codes */
158/* internal returns start at 0x100 to make exit(1..255) work */ 158/* internal returns start at 0x100 to make exit(1..255) work */
@@ -454,6 +454,7 @@ struct plugin_api {
454 int (*mkdir)(const char *name); 454 int (*mkdir)(const char *name);
455 int (*rmdir)(const char *name); 455 int (*rmdir)(const char *name);
456 bool (*dir_exists)(const char *path); 456 bool (*dir_exists)(const char *path);
457 struct dirinfo (*dir_get_info)(DIR* parent, struct dirent *entry);
457 458
458 /* kernel/ system */ 459 /* kernel/ system */
459#if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE 460#if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE
@@ -498,12 +499,16 @@ struct plugin_api {
498 void (*trigger_cpu_boost)(void); 499 void (*trigger_cpu_boost)(void);
499 void (*cancel_cpu_boost)(void); 500 void (*cancel_cpu_boost)(void);
500#endif 501#endif
501#ifdef HAVE_CPUCACHE_FLUSH 502
502 void (*cpucache_flush)(void); 503 void (*cpucache_flush)(void);
503#endif
504#ifdef HAVE_CPUCACHE_INVALIDATE
505 void (*cpucache_invalidate)(void); 504 void (*cpucache_invalidate)(void);
506#endif 505
506 /* load code api for overlay */
507 void* (*lc_open)(const char *filename, unsigned char *buf, size_t buf_size);
508 void* (*lc_open_from_mem)(void* addr, size_t blob_size);
509 void* (*lc_get_header)(void *handle);
510 void (*lc_close)(void *handle);
511
507 bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), 512 bool (*timer_register)(int reg_prio, void (*unregister_callback)(void),
508 long cycles, void (*timer_callback)(void) 513 long cycles, void (*timer_callback)(void)
509 IF_COP(, int core)); 514 IF_COP(, int core));
@@ -894,13 +899,6 @@ struct plugin_api {
894 899
895 /* new stuff at the end, sort into place next time 900 /* new stuff at the end, sort into place next time
896 the API gets incompatible */ 901 the API gets incompatible */
897 struct dirinfo (*dir_get_info)(DIR* parent, struct dirent *entry);
898
899 /* load code api for overlay */
900 void* (*lc_open)(const char *filename, unsigned char *buf, size_t buf_size);
901 void* (*lc_open_from_mem)(void* addr, size_t blob_size);
902 void* (*lc_get_header)(void *handle);
903 void (*lc_close)(void *handle);
904}; 902};
905 903
906/* plugin header */ 904/* plugin header */
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c
index 09274133b7..d581d74f8e 100644
--- a/apps/plugins/test_codec.c
+++ b/apps/plugins/test_codec.c
@@ -601,10 +601,8 @@ static void init_ci(void)
601 ci.profile_func_exit = rb->profile_func_exit; 601 ci.profile_func_exit = rb->profile_func_exit;
602#endif 602#endif
603 603
604#if NUM_CORES > 1
605 ci.cpucache_invalidate = rb->cpucache_invalidate; 604 ci.cpucache_invalidate = rb->cpucache_invalidate;
606 ci.cpucache_flush = rb->cpucache_flush; 605 ci.cpucache_flush = rb->cpucache_flush;
607#endif
608 606
609#if NUM_CORES > 1 607#if NUM_CORES > 1
610 ci.create_thread = rb->create_thread; 608 ci.create_thread = rb->create_thread;