From 4341211ddc300e7f64e2935f8e19052d1c12c7ed Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 26 Sep 2004 09:25:59 +0000 Subject: Added header file for bitswap, and made the fliptable global for re-use git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5120 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 2 +- apps/talk.c | 2 +- firmware/bitswap.S | 1 + firmware/export/bitswap.h | 25 +++++++++++++++++++++++++ firmware/mpeg.c | 2 +- 5 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 firmware/export/bitswap.h diff --git a/apps/plugin.c b/apps/plugin.c index 6892cb957f..9a7a397bea 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -67,7 +67,7 @@ static unsigned char pluginbuf[PLUGIN_BUFFER_SIZE]; #else extern unsigned char pluginbuf[]; -extern void bitswap(unsigned char *data, int length); +#include "bitswap.h" #endif static bool plugin_loaded = false; diff --git a/apps/talk.c b/apps/talk.c index 941af1dfd9..c0fe599b60 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -32,7 +32,7 @@ #include "lang.h" #include "talk.h" #include "id3.h" -extern void bitswap(unsigned char *data, int length); /* no header for this */ +#include "bitswap.h" /***************** Constants *****************/ diff --git a/firmware/bitswap.S b/firmware/bitswap.S index 25d7a99ad2..08e609b9e5 100644 --- a/firmware/bitswap.S +++ b/firmware/bitswap.S @@ -109,6 +109,7 @@ _bitswap: nop .align 2 + .global _fliptable .byte 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1 .byte 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1 diff --git a/firmware/export/bitswap.h b/firmware/export/bitswap.h new file mode 100644 index 0000000000..92b37c33e1 --- /dev/null +++ b/firmware/export/bitswap.h @@ -0,0 +1,25 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2004 by Jens Arnold + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef _BITSWAP_H_ +#define _BITSWAP_H_ + +extern void bitswap(unsigned char *data, int length); +extern const unsigned char fliptable[]; /* index is signed char! */ + +#endif diff --git a/firmware/mpeg.c b/firmware/mpeg.c index a958d56939..e6d59176f7 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -42,7 +42,7 @@ #include "mpegplay.h" #endif /* #ifndef SIMULATOR */ -extern void bitswap(unsigned char *data, int length); +#include "bitswap.h" #ifdef HAVE_MAS3587F static void init_recording(void); -- cgit v1.2.3