summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-02-14 07:46:11 +0000
committerJens Arnold <amiconn@rockbox.org>2007-02-14 07:46:11 +0000
commit19417db99ac8475fc111a5b9a7b4caa186cb476e (patch)
tree4930c18450e1cb9b89fe9899e487b2cf6d0a2f2c /firmware
parent4de600b46ecdac7c9b9f861ce54d446189718538 (diff)
Use the correct swap functions for live conversion, and fix 64 bit sims.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12302 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/structec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/common/structec.c b/firmware/common/structec.c
index ec7e1409fd..7c76874692 100644
--- a/firmware/common/structec.c
+++ b/firmware/common/structec.c
@@ -18,6 +18,7 @@
****************************************************************************/
#include <string.h>
+#include <inttypes.h>
#include "structec.h"
#include "system.h"
#include "file.h"
@@ -66,17 +67,17 @@ void structec_convert(void *structure, const char *ecinst,
/* Swap 2 bytes. */
case 's':
{
- unsigned short *data = (unsigned short *)buf;
- *data = SWAP_16(*data);
+ uint16_t *data = (uint16_t *)buf;
+ *data = swap16(*data);
buf += 2;
break;
}
-
+
/* Swap 4 bytes. */
case 'l':
{
- unsigned long *data = (unsigned long *)buf;
- *data = SWAP_32(*data);
+ uint32_t *data = (uint32_t *)buf;
+ *data = swap32(*data);
buf += 4;
break;
}