/*
* @file hv_drv_UsbDefines.h
* @brief HAL layer porting for usb gadget. 
*
* @author HiView SoC Software Team
* @version 1.0.0
* @date 2022-06-15
*/


#ifndef __HV_DRV_USB_DEFINES_H_
#define __HV_DRV_USB_DEFINES_H_

/* standard C Header */
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "stdlib.h"
#include "hv_vos_Comm.h"
#include "hv_comm_DataType.h"


/* specific def and operation */
#include "hv_drv_UsbErrNo.h"



#define typeof  __typeof__


#define pr_debug        HV_LOGV
#define pr_err          HV_LOGE
#define pr_info         HV_LOGI 


#define HAL_W32         HV_W32
#define HAL_R32         HV_R32
#define HAL_W16         HV_W16
#define HAL_R16         HV_R16
#define HAL_W8          HV_W8
#define HAL_R8          HV_R8
#define HAL_W32_MASK    HV_W32_MASK


typedef unsigned char     __u8;
typedef char              __s8;
typedef unsigned short    __u16;
typedef unsigned int      __u32;
typedef signed short      __s16;
typedef signed int        __s32;


typedef __u16  __le16;
typedef __u16  __be16;
typedef __u32  __le32;
typedef __u32  __be32;
typedef __u16  __sum16;
typedef __u32  __wsum;


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


typedef unsigned short      le16;
typedef unsigned short      be16;
typedef unsigned int        le32;
typedef unsigned int        be32;


/* sysv */
typedef unsigned char       unchar;
typedef unsigned short      ushort;
typedef unsigned int        uint;
typedef unsigned long       ulong;



typedef unsigned int        gfp_t;
typedef long long           loff_t;
typedef u32                 dma_addr_t;

#define false               0
#define true                1

#define cpu_to_le64(x)      x
#define le64_to_cpu(x)      x
#define cpu_to_le32(x)      x
#define le32_to_cpu(x)      x
#define cpu_to_le16(x)      x
#define le16_to_cpu(x)      x

#endif

