/*
 * @file hv_pm51_Base.h
 * @brief Header file of base definition(include data type, bits and others).
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-03-01
 */

#ifndef __HV_PM51_BASE_H__
#define __HV_PM51_BASE_H__

typedef unsigned char                   UCHAR8;
typedef unsigned short                  USHORT16;
typedef unsigned long                   ULONG32;
typedef unsigned char                   BOOL;
typedef unsigned char   idata           iBOOL;
typedef unsigned char   xdata           xUCHAR8;
typedef unsigned short  xdata           xUSHORT16;
typedef unsigned long   xdata           xULONG32;
typedef unsigned char   idata           iUCHAR8;
typedef unsigned short  idata           iUSHORT16;
typedef unsigned long   idata           iULONG32;


#define __IO                   volatile
#define __I                    volatile const
#define __O                    volatile

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

#ifndef HV_TRUE
#define HV_TRUE                1
#endif

#ifndef HV_FALSE
#define HV_FALSE               0
#endif

#define HV_UNUSED(var)         ((var) = (var))

#define HV_MODE_OFF            0
#define HV_MODE_ON             1

/* */
#define C51_CLK_FREQ           (26600000)
/* difine deglitch num */
#define IO_DEGLITCH_NUM        (0x2000)

/* define BIT0~BIT31 */
#define BIT_0          0x00000001    /* define BIT_0 */
#define BIT_1          0x00000002    /* define BIT_1 */
#define BIT_2          0x00000004    /* define BIT_2 */
#define BIT_3          0x00000008    /* define BIT_3 */
#define BIT_4          0x00000010    /* define BIT_4 */
#define BIT_5          0x00000020    /* define BIT_5 */
#define BIT_6          0x00000040    /* define BIT_6 */
#define BIT_7          0x00000080    /* define BIT_7 */
#define BIT_8          0x00000100    /* define BIT_8 */
#define BIT_9          0x00000200    /* define BIT_9 */
#define BIT_10         0x00000400    /* define BIT_10 */
#define BIT_11         0x00000800    /* define BIT_11 */
#define BIT_12         0x00001000    /* define BIT_12 */
#define BIT_13         0x00002000    /* define BIT_13 */
#define BIT_14         0x00004000    /* define BIT_14 */
#define BIT_15         0x00008000    /* define BIT_15 */
#define BIT_16         0x00010000    /* define BIT_16 */
#define BIT_17         0x00020000    /* define BIT_17 */
#define BIT_18         0x00040000    /* define BIT_18 */
#define BIT_19         0x00080000    /* define BIT_19 */
#define BIT_20         0x00100000    /* define BIT_20 */
#define BIT_21         0x00200000    /* define BIT_21 */
#define BIT_22         0x00400000    /* define BIT_22 */
#define BIT_23         0x00800000    /* define BIT_23 */
#define BIT_24         0x01000000    /* define BIT_24 */
#define BIT_25         0x02000000    /* define BIT_25 */
#define BIT_26         0x04000000    /* define BIT_26 */
#define BIT_27         0x08000000    /* define BIT_27 */
#define BIT_28         0x10000000    /* define BIT_28 */
#define BIT_29         0x20000000    /* define BIT_29 */
#define BIT_30         0x40000000    /* define BIT_30 */
#define BIT_31         0x80000000    /* define BIT_31 */

#endif
