
/** Machine and/or Compiler Specifics
 *
 *  BIG_ENDIAN specifies the byte and word ordering convention.
 *  If TRUE (1), the target implementation is big-endian;
 *  otherwise, FALSE (0) means little-endian.
 *
 *  UNALIGNED_DATA_ACCESS_OK specifies whether unaligned data
 *  accesses are fault-free.  If TRUE (1), reading or writing an
 *  object that is not aligned on its natural boundary will not
 *  cause a fault (but could reduce performance); otherwise,
 *  FALSE (0) means that an unaligned access will cause a fault.
 *
 *  PRAGMA_PACK_ENABLE and PRAGMA_PACK_DISABLE are
 *  compiler-specific preprocessor tokens that control structure
 *  packing.
 *
 *  Note: The widths connoted byte these typedef's may not be
 *        exactly represented on some architectures (e.g., some
 *        DSP's have 24-bit integers).
 */
#if   defined (__C51__) /* Keil C51 */

typedef signed   char   S8;
typedef unsigned char   U8;
typedef signed   short  S16;
typedef unsigned short  U16;
typedef signed   long   S32;
typedef unsigned long   U32;

#define BIG_ENDIAN                  1   /**< Big-endian         */
#define PRAGMA_PACK_ENABLE
#define PRAGMA_PACK_DISABLE
#define UNALIGNED_DATA_ACCESS_OK    1   /**< Won't cause faults */

#elif defined (_MPC_)   /* HI-TECH PICC */

typedef signed   char   S8;
typedef unsigned char   U8;
typedef signed   short  S16;
typedef unsigned short  U16;
typedef signed   long   S32;
typedef unsigned long   U32;

#define BIG_ENDIAN                  0   /**< Little-endian      */
#define PRAGMA_PACK_ENABLE
#define PRAGMA_PACK_DISABLE
#define UNALIGNED_DATA_ACCESS_OK    1   /**< Won't cause faults */

#elif defined (__DCC__) /* Diab */

typedef signed   char   S8;
typedef unsigned char   U8;
typedef signed   short  S16;
typedef unsigned short  U16;
typedef signed   long   S32;
typedef unsigned long   U32;

#define BIG_ENDIAN                  1   /**< Big-endian         */
#define PRAGMA_PACK_ENABLE          pack
#define PRAGMA_PACK_DISABLE         pack()
#define UNALIGNED_DATA_ACCESS_OK    1   /**< Won't cause faults */

#else   /* Assume MS VC++ PC host compiler. */

/*  Replacements for C51 specific names/extensions.
 */
#define idata
#define xdata
#if 0
#define data
#define code
#endif
#define reentrant

/*  Replacements for PICC specific names/extensions.
 */
#define bank0
#define bank1
#define bank2
#define bank3

/*  Replacements for C51 and PICC specific names/extensions.
 */
#define bit                 U8

typedef signed   char       S8;
typedef unsigned char       U8;
typedef signed   short      S16;
typedef unsigned short      U16;
typedef signed   long       S32;
typedef unsigned long       U32;
typedef signed   __int64    S64;
typedef unsigned __int64    U64;

#define BIG_ENDIAN                  0   /**< Little-endian      */
#define PRAGMA_PACK_ENABLE          pack(1)
#define PRAGMA_PACK_DISABLE         pack()
#define UNALIGNED_DATA_ACCESS_OK    1   /**< Won't cause faults */
