#ifndef NDefs_h
#define NDefs_h
/*******************************************************************************
NDefs - General Nohau include file for definitions and configuration. Should be
included first in each file.
 
Creator: Sten Larsson
$Header: /NCARM_Misc/BSP_ARM/Src/Inc/NDefs.h 4     8/05/03 12:23p Stenl $
Copyright  ©  2003, Nohau Corporation.  All Rights Reserved.
Copyright (c) 2003, Nohau Corporation.  All Rights Reserved.
*******************************************************************************/
#include "NConfig.h"

typedef int BOOL;
#define TRUE   1
#define FALSE  0

typedef unsigned char  BYTE;
typedef unsigned char  U_INT8;
typedef   signed char  S_INT8;
typedef unsigned short WORD;
typedef unsigned short U_INT16;
typedef   signed short S_INT16;
typedef unsigned int   DWORD;
typedef unsigned int   U_INT32;
typedef   signed int   S_INT32;
typedef unsigned int   U_INT;
typedef   signed int   S_INT;
typedef unsigned       NSPACE;  /* NMon - data space */
typedef unsigned int   ADDRESS; /* NMon */

#define U_INT32_MAX  0xFFFFFFFF
#define U_INT32_MIN           0
#define U_INT16_MAX      0xFFFF
#define U_INT16_MIN           0
#define U_INT8_MAX         0xFF
#define U_INT8_MIN            0

#define S_INT32_MAX  0x7FFFFFFF
#define S_INT32_MIN -0x7FFFFFFF
#define S_INT16_MAX      0x7FFF
#define S_INT16_MIN     -0x7FFF
#define S_INT8_MAX         0x7F
#define S_INT8_MIN        -0x7F

#if (NCFG_FLASH_WIDTH == 1)
   typedef unsigned char  NFLASHWORD;
   #define NFLASH_ERASED  0xFF
#elif (NCFG_FLASH_WIDTH == 2)
   typedef unsigned short NFLASHWORD;
   #define NFLASH_ERASED  0xFFFF
#elif (NCFG_FLASH_WIDTH == 4)
   typedef unsigned int   NFLASHWORD;  // 32-bit width
   #define NFLASH_ERASED  0xFFFFFFFF
#endif

#endif /* NDefs_h */
