mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-10-19 15:07:56 +00: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:
+1
-1
@@ -21,7 +21,7 @@ compiler:
|
|||||||
- --no_tbaa
|
- --no_tbaa
|
||||||
- --debug
|
- --debug
|
||||||
- -D__MSP430F149__
|
- -D__MSP430F149__
|
||||||
- -DBUS_WIDTH=16
|
- -DINT_WIDTH=16
|
||||||
- -DUNITY_FLOAT_SUPPORT_DISABLED
|
- -DUNITY_FLOAT_SUPPORT_DISABLED
|
||||||
- -e
|
- -e
|
||||||
- -Ol
|
- -Ol
|
||||||
|
|||||||
+15
-10
@@ -11,22 +11,27 @@
|
|||||||
// Bus Width Management
|
// Bus Width Management
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
|
|
||||||
#if defined(BUS_WIDTH) && (BUS_WIDTH != 32)
|
#ifndef INT_WIDTH
|
||||||
#if (BUS_WIDTH == 16)
|
#define INT_WIDTH (32)
|
||||||
typedef unsigned char _UU8;
|
#endif
|
||||||
typedef unsigned int _UU16;
|
|
||||||
typedef unsigned long _UU32;
|
#if (INT_WIDTH == 32)
|
||||||
typedef signed char _US8;
|
|
||||||
typedef signed int _US16;
|
|
||||||
typedef signed long _US32;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
typedef unsigned char _UU8;
|
typedef unsigned char _UU8;
|
||||||
typedef unsigned short _UU16;
|
typedef unsigned short _UU16;
|
||||||
typedef unsigned int _UU32;
|
typedef unsigned int _UU32;
|
||||||
typedef signed char _US8;
|
typedef signed char _US8;
|
||||||
typedef signed short _US16;
|
typedef signed short _US16;
|
||||||
typedef signed int _US32;
|
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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user