summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/wrappers.h
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-08 02:49:23 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-08 02:49:23 +0000
commit07e982df8a0e3a72a357839ec0a6ff7d462bd173 (patch)
tree608c433f6576cbedf2114297870d9a13575d862e /apps/plugins/lib/wrappers.h
parentc38815aa2983bbb8dae7ec9dbea055a3b8e38297 (diff)
downloadrockbox-07e982df8a0e3a72a357839ec0a6ff7d462bd173.zip
rockbox-07e982df8a0e3a72a357839ec0a6ff7d462bd173.tar.gz
rockbox-07e982df8a0e3a72a357839ec0a6ff7d462bd173.tar.bz2
rockbox-07e982df8a0e3a72a357839ec0a6ff7d462bd173.tar.xz
cleanup for core-file-in-pluginlib compilation:
wrapper C files in pluginlib renamed to the same name as the core files they wrap pluginlib-only init functions for resize and bmp moved into the wrapper files, and declared in the associated header files API() macro removed entirely, in favor of a core-only header file that redefines core function names to use a plugin_api pointer some unnecessary uses of PLUGIN in apps/recorder/bmp.c removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19712 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/wrappers.h')
-rw-r--r--apps/plugins/lib/wrappers.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/apps/plugins/lib/wrappers.h b/apps/plugins/lib/wrappers.h
new file mode 100644
index 0000000..2eb4ea0
--- /dev/null
+++ b/apps/plugins/lib/wrappers.h
@@ -0,0 +1,44 @@
+/***************************************************************************
+* __________ __ ___.
+* Open \______ \ ____ ____ | | _\_ |__ _______ ___
+* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+* \/ \/ \/ \/ \/
+* $Id$
+*
+* Copyright (C) 2009 by Andrew Mahone
+*
+* This header redefines some core functions as calls via the plugin_api, to
+* allow easy compilation of core source files in the pluginlib with different
+* features from the version built for the core, or when a core object file is
+* not built for a particular target.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+* KIND, either express or implied.
+*
+****************************************************************************/
+
+#ifndef _LIB_WRAPPERS_H_
+#define _LIB_WRAPPERS_H_
+
+#define open rb->open
+#define close rb->close
+#define read rb->read
+#define lseek rb->lseek
+#define memset rb->memset
+#ifdef HAVE_ADJUSTABLE_CPU_FREQ
+#define cpu_boost rb->cpu_boost
+#endif
+#define yield rb->yield
+#if CONFIG_CODEC == SWCODEC
+#define align_buffer rb->align_buffer
+#endif
+
+#endif
+