#ifndef STD_TYPES_H
#define STD_TYPES_H

typedef unsigned char BOOL;
typedef unsigned char UI_8; 
typedef unsigned short UI_16;
typedef unsigned long UI_32;
typedef signed char SI_8;
typedef unsigned char t_error;
typedef UI_8 t_com_buf_hdl;
typedef UI_32 t_timer_time;
typedef unsigned char         boolean;       /*        TRUE .. FALSE           */

typedef signed char           sint8;         /*        -128 .. +127            */
typedef unsigned char         uint8;         /*           0 .. 255             */
typedef signed short          sint16;        /*      -32768 .. +32767          */
typedef unsigned short        uint16;        /*           0 .. 65535           */
typedef signed long           sint32;        /* -2147483648 .. +2147483647     */
typedef unsigned long         uint32;        /*           0 .. 4294967295      */

typedef signed int            sint8_least;   /* At least 7 bit + 1 bit sign    */
typedef unsigned int          uint8_least;   /* At least 8 bit                 */
typedef signed int            sint16_least;  /* At least 15 bit + 1 bit sign   */
typedef unsigned int          uint16_least;  /* At least 16 bit                */
typedef signed int            sint32_least;  /* At least 31 bit + 1 bit sign   */
typedef unsigned int          uint32_least;  /* At least 32 bit                */

typedef float				  float32;
typedef double				  float64;

#ifndef TRUE
  #define TRUE            1u
#endif

#ifndef FALSE
  #define FALSE           0u
#endif


#ifndef NULL_PTR
  #define NULL_PTR  ((void *)0)
#endif

#ifndef 	NULL
#define	NULL	0
#endif

#define STD_HIGH     1u /* Physical state 5V or 3.3V */
#define STD_LOW      0u /* Physical state 0V */

#define STD_ACTIVE   1u /* Logical state active */
#define STD_IDLE     0u /* Logical state idle */

#define STD_ON       1u
#define STD_OFF      0u

#ifndef E_OK
#define E_OK      0u
#endif

#ifndef E_NOT_OK
#define E_NOT_OK  1u
#endif


typedef uint8 Std_ReturnType;

typedef unsigned char t_error;
#define ERROR_OK ((t_error)0)
#define ERROR_GENERIC ((t_error)0xFF)
#define ERROR_FUNC_NOT_IMPLEMENTED ((t_error)0xFE)


#define E_NO_DTC_AVAILABLE		(Std_ReturnType)2u
#define E_SESSION_NOT_ALLOWED	(Std_ReturnType)4u
#define E_PROTOCOL_NOT_ALLOWED	(Std_ReturnType)5u
#define E_REQUEST_NOT_ACCEPTED	(Std_ReturnType)8u
#define E_REQUEST_ENV_NOK		(Std_ReturnType)9u
#define E_PENDING				(Std_ReturnType)10u
#define E_COMPARE_KEY_FAILED	(Std_ReturnType)11u
#define E_FORCE_RCRRP			(Std_ReturnType)12u




#endif
