⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ttype.h

📁 VIA VT6524 8口网管交换机源码
💻 H
字号:
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * This software is copyrighted by and is the sole property of
 * VIA Networking Technologies, Inc. This software may only be used
 * in accordance with the corresponding license agreement. Any unauthorized
 * use, duplication, transmission, distribution, or disclosure of this
 * software is expressly forbidden.
 *
 * This software is provided by VIA Networking Technologies, Inc. "as is"
 * and any express or implied warranties, including, but not limited to, the
 * implied warranties of merchantability and fitness for a particular purpose
 * are disclaimed. In no event shall VIA Networking Technologies, Inc.
 * be liable for any direct, indirect, incidental, special, exemplary, or
 * consequential damages.
 *
 *
 * File:    ttype.h
 *
 * Purpose: Define basic common types, macros and compiler directives
 *
 * Author:  Tevin Chen
 *
 * Date:    Jan 08, 2002
 *
 */


#ifndef __TTYPE_H__
#define __TTYPE_H__

#if !defined(__UCONFIG_H__)
#include "uconfig.h"
#endif




/******* Common definitions and typedefs *************************************/
// Define data types
typedef signed int      INT;    // int (size depend on platform)
typedef signed char     INT8;   // 8-bit  int
typedef signed short    INT16;  // 16-bit int
typedef signed long     INT32;  // 32-bit int

typedef unsigned int    UINT;   // unsigned int (size depend on platform)
typedef unsigned char   UINT8;  // 8-bit  value
typedef unsigned short  UINT16; // 16-bit value
typedef unsigned long   UINT32; // 32-bit value

typedef unsigned char   BYTE;   // 8-bit
typedef unsigned short  WORD;   // 16-bit value
typedef unsigned long   DWORD;  // 32-bit value

typedef char            CHAR;   // 8-bit

#if defined __CPU_8051
typedef char            BOOL;   // 8-bit
#else
typedef int             BOOL;   // int (size depend on platform)
#endif

// Define pointer types
typedef INT*            PINT;
typedef INT8*           PINT8;
typedef INT16*          PINT16;
typedef INT32*          PINT32;

typedef UINT*           PUINT;
typedef UINT8*          PUINT8;
typedef UINT16*         PUINT16;
typedef UINT32*         PUINT32;

typedef BYTE*           PBYTE;
typedef WORD*           PWORD;
typedef DWORD*          PDWORD;

typedef CHAR*           PSTR;
typedef BOOL*           PBOOL;

typedef void*           PVOID;


// Define frequently used constants
#if !defined(NULL)
#ifdef __cplusplus
#define NULL            (0)
#else
#define NULL            ((void *)0)
#endif // __cplusplus
#endif // !NULL

#if !defined(TRUE)
#define TRUE            (1)
#endif
#if !defined(FALSE)
#define FALSE           (0)
#endif

#if !defined(SUCCESS)
#define SUCCESS         (0)
#endif
#if !defined(FAILED)
#define FAILED          (-1)
#endif


/****** Misc definitions, types **********************************************/
// max value for various types
#define UINT8_MAX       0xFF
#define UINT16_MAX      0xFFFF
#define UINT32_MAX      0xFFFFFFFFUL


// Define compiler directives for Keil C51 compiler
#if defined __CPU_8051
    #define DIRECT_MEMTYPE_CODE     code
    #define DIRECT_MEMTYPE_DATA     data

    #if defined __MODULE_WEB_SMART
        #define DIRECT_FUNTYPE_REENT
    #else
        #define DIRECT_FUNTYPE_REENT    reentrant
    #endif

#else
    #define DIRECT_MEMTYPE_CODE
    #define DIRECT_MEMTYPE_DATA
    #define DIRECT_FUNTYPE_REENT
#endif




#endif /* __TTYPE_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -