/**
  ******************************************************************************
  * @file    type.h
  * @author  Product application department
  * @version V1.0
  * @date    2020.02.18
  * @brief   Header file of type.
  *
  ******************************************************************************
*/

#ifndef __TYPE_H__
#define __TYPE_H__

/*****************************************************************************/

#define  __I               volatile const       /*!< Defines 'read only' permissions                 */
#define  __O               volatile             /*!< Defines 'write only' permissions                */
#define  __IO              volatile             /*!< Defines 'read / write' permissions              */

#define TRUE               1
#define FALSE              0
#define NULL               ((void *)0)    /*!< Defines 'NULL' permissions */

/*****************************************************************************/
typedef unsigned char      boolean;
typedef signed char        int8_t;
typedef signed short       int16_t;
typedef signed int         int32_t;

typedef unsigned char      uint8_t;
typedef unsigned short     uint16_t;
typedef unsigned int       uint32_t;

typedef unsigned char      u8;
typedef signed   char      s8;
typedef unsigned short     u16;
typedef signed   short     s16;
typedef unsigned int       u32;
typedef signed   int       s32;

typedef signed char             INT8;
typedef unsigned int            UINT32;
typedef unsigned short int      UINT16;
typedef unsigned char           UINT8;

typedef volatile uint32_t  vu32;
typedef volatile uint16_t vu16;
typedef volatile uint8_t  vu8; 

typedef float              float32_t;
typedef unsigned char      bool;

/*****************************************************************************/
typedef union
{
	uint16_t size;
	uint8_t  size_byte[2];
}uint16_8_union_t;

typedef union
{ 
	uint32_t size;
	uint16_t size_short[2];
	uint8_t  size_byte[4];
}uint32_8_union_t;

/*****************************************************************************/
typedef enum
{
    BIT_RESET = 0,
    BIT_SET   = 1
}BitActionTypeDef;

typedef enum
{
	DISABLE = 0,
	ENABLE  = 1
} FunctionalStateTypeDef;

typedef enum
{
	RESET = 0,
	SET   = 1
}FlagStatusTypeDef;

/*****************************************************************************/
#define GPIO_PinStateTypeDef FlagStatusTypeDef
#define FunctionalState   FunctionalStateTypeDef

#endif /* __TYPE_H__ */

