/** @file	: common.h
  *	purpose	: Providing includes, macros, and
  *			  types included in all environments
  *
  * (c) Copyright Engineering Spirit NL 2005.
  * All rights reserved.
  *
  *	By		: Henk van de Berg
  *
  *	Reviion list:
  *	Date		Changes\n
  *	2006-12-12	Initial release
  */
#ifndef COMMON_H
#define COMMON_H 1

#ifndef AVR_STANDALONE

#ifdef LINUX
#include <stdint.h>
#include <unistd.h>
#include <limits.h>


typedef uint8_t		BYTE;
typedef uint16_t	WORD;
typedef uint32_t	DWORD;

typedef uint8_t		u8;
typedef uint16_t	u16;
typedef uint32_t	u32;
typedef int8_t		s8;
typedef int16_t		s16;
typedef int32_t		s32;
typedef intptr_t	sintprt;
typedef uintptr_t	uintptr;


#else
typedef unsigned char		BYTE;
typedef unsigned short		WORD;
typedef unsigned long		DWORD;

typedef unsigned char		u8;
typedef unsigned short		u16;
typedef unsigned long		u32;
typedef unsigned __int64	u64;
typedef char				s8;
typedef short				s16;
typedef long				s32;
typedef __int64				s64;

typedef s32	sintprt;
typedef u32	uintptr;
#endif //LINUX

#else

#include "compiler.h"

#endif //avrstandalone


#ifdef TUNER_EMBEDDED
#  include "embedded.h"
#else
#ifdef WIN32
#  include "win32.h"
#else
#ifdef LINUX
#  include "linux.h"
#endif /* LINUX */
#endif /* WIN32 */
#endif /* TUNER_EMBEDDED */

#ifndef TUNER_EMBEDDED
#ifndef MAX_PATH
#define MAX_PATH 512
#endif
#endif


#endif /* COMMON_H */

