/*************************************************************************
 * Copyright (c) 1998 - 2000 by Borst Automation, Fachingen
 * All rights reserved
 *
 * Filename:  Types.h
 * Project:   HART Slave
 * Date:      Sep-10-99
 * Author(s): W. Borst
 *
 * Revision:
 * Date:      Name:       Version:  Description:
 * Dec-03-98  W. Borst    -----     Initial Draft
 * Sep-10-99  W. Borst    1.1       Changes for Project be001/99
 * Jul-24-00  W. Borst    1.2       Changed Nomenclature
 *
 * Description: standard type declarations
 *
 *************************************************************************/
#ifndef __globaltypedefs_h__
  #define __globaltypedefs_h__

  /*
   * Basic Types
   */
  #define T_VOID   void
  #define T_CHR    char
  #define T_UCHR   unsigned char
  #define T_INT    int
  #define T_UINT   unsigned int
  #define T_LONG   long
  #define T_ULONG  unsigned long
  #define T_FLOAT  float
  #define T_DOUBLE double
  #define T_BYTE   unsigned char
  #define T_BOOL   unsigned char 

  /*
   * Pointer Types
   */
  #define T_PVOID   void *
  #define T_PCHR    char *
  #define T_PUCHR   unsigned char *
  #define T_PINT    int *
  #define T_PUINT   unsigned int *
  #define T_PLONG   long *
  #define T_PULONG  unsigned long *
  #define T_PFLOAT  float *
  #define T_PDOUBLE double *
  #define T_PBYTE   unsigned char *
  #define T_PBOOL   unsigned char *
  
  
  /*
   * Boolean
   */
  #define T_TRUE  1
  #define T_FALSE 0

 /*
  * Direction control
  */
  #define T_INPUT  0
  #define T_OUTPUT 1 
  
 /*
  * Bits
  */
  #define T_SET   1
  #define T_CLEAR 0 

  /*
   * Declarators
   */
  #define T_CONST    const
  #define T_VOLATILE volatile
  #ifdef __TARGET_I386__
    #define T_REGISTER
  #else
    #define T_REGISTER register
  #endif
  #ifndef NULL
    #define NULL 0
  #endif     

 /*
  * Older Types 
  */ 
  #define UINT   unsigned int
  #define UINT8  unsigned char
  #ifndef UINT16
    #define UINT16 unsigned int
  #endif
  #define UINT24 unsigned long
  #define UINT32 unsigned long
  #ifndef INT
    #define INT int
  #endif
  #ifndef FLOAT
    #define FLOAT float
  #endif     
  #define DOUBLE double
  #define BYTE   unsigned char
  #define UCHR   unsigned char
  #define CHR    char
  #define ULONG  unsigned long
  #define LONG   long
  #define VOID   void
  #ifndef BOOL
    #define BOOL  unsigned char
  #endif  

 /*
  * Old Pointer Types
  */
  #define PUINT  unsigned int*
  #define PINT   int*
  #define PFLOAT float*
  #define PBYTE  unsigned char*
  #define PUCHR  unsigned char*     
  #define PCHR   char*
  #define PULONG unsigned long*
  #define PVOID  void*
  
 /*
  * TRUE/FALSE
  */
  #ifndef FALSE
    #define FALSE 0
    #define TRUE  1
  #endif
#endif