1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00

Cleaned up typedefs for micro integer width configuration.

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@42 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
greg-williams
2009-08-31 15:59:48 +00:00
parent 812a71e983
commit 71b4f95a0a
2 changed files with 16 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ compiler:
- --no_tbaa
- --debug
- -D__MSP430F149__
- -DBUS_WIDTH=16
- -DINT_WIDTH=16
- -DUNITY_FLOAT_SUPPORT_DISABLED
- -e
- -Ol

View File

@@ -11,22 +11,27 @@
// Bus Width Management
//-------------------------------------------------------
#if defined(BUS_WIDTH) && (BUS_WIDTH != 32)
#if (BUS_WIDTH == 16)
typedef unsigned char _UU8;
typedef unsigned int _UU16;
typedef unsigned long _UU32;
typedef signed char _US8;
typedef signed int _US16;
typedef signed long _US32;
#endif
#else
#ifndef INT_WIDTH
#define INT_WIDTH (32)
#endif
#if (INT_WIDTH == 32)
typedef unsigned char _UU8;
typedef unsigned short _UU16;
typedef unsigned int _UU32;
typedef signed char _US8;
typedef signed short _US16;
typedef signed int _US32;
#elif (INT_WIDTH == 16)
typedef unsigned char _UU8;
typedef unsigned int _UU16;
typedef unsigned long _UU32;
typedef signed char _US8;
typedef signed int _US16;
typedef signed long _US32;
#else
#error Invalid INT_WIDTH specified! (32 or 16 only are currently supported)
#error Defaults to INT_WIDTH=32 if unspecified
#endif