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

📄 type32.h

📁 rtCell 实时微内核-具有下列功能: 1. 完全抢占的实时微内核结构
💻 H
字号:
/*
 *******************************************************************************
 *                      The real-time kernel "rtCell"                          *
 *              Copyright 2005 taowentao, allrights reserved.                  *
 * File : Type32.h                                                             *
 * By   : taowentao     2004-11-30                                             *
 *                      2005-08-05                                             *
 *******************************************************************************
 */
       
#if !defined(TYPE32_H)
#define TYPE32_H

/*
 *******************************************************************************
 *                                   TYPE DEFINE  ,                            *
 *               THIS MAKES DATA TYPE INDEPENDENT WITH THE COMPILERS           *
 *******************************************************************************
 */  

/*unsigned data type*/
#define NULL ((void*)0)

typedef unsigned char  UINT_8  ;       /* unsigned    8  bit  */
typedef unsigned short int   UINT_16 ; /* unsigned   16  bit  */
typedef unsigned int   UINT_32 ;       /* unsigned   32  bit  */
typedef unsigned long  ULONG   ;

typedef unsigned int   UINT    ;       /* unsigned int, same size as the CPU */

/*signed data type*/

typedef signed   char  INT_8  ;        /* Signed    8 bit  */
typedef signed   short int   INT_16 ;  /* Signed   16 bit  */
typedef signed   int   INT_32 ;        /* Signed   32 bit  */
typedef signed   long  LONG   ;

/*
 *******************************************************************************
 *                           micro-kernel type define                          *
 *               THIS MAKES DATA TYPE INDEPENDENT WITH THE COMPILERS           *
 *******************************************************************************
 */  

/******************************************************************************/
/*  To port to another platform, you must realize the following basic types.  */
/******************************************************************************/

/* CWORD always has the same size length of bits as the CPU word */
typedef UINT         CWORD  ;          /* unsigned CPU WORD, 16, 32... */

/* CWORD always has the same size length of bits as the CPU */
typedef UINT_8       BYTE  ;           /* unsigned    8  bit  */
typedef UINT_8       STR  ;            /* unsigned    8  bit  */
typedef UINT_16      WORD  ;           /* unsigned    16 bit  */
typedef UINT_32      DWORD ;           /* unsigned    32 bit  */
typedef CWORD        PTROFF ;          /* pointer offset same size as CPU */

/*boolean data type*/
typedef UINT_16      BOOL ;
typedef CWORD        CBOOL ;
#define true         1
#define false        0

/* represent a memory block's size */
typedef CWORD        size_t;

/******************************************************************************/
/*    To port to another platform, you must realize the basic types above.    */
/******************************************************************************/

/*
 *******************************************************************************
 *                                                                             *
 *******************************************************************************
 */
#endif /* end of Type32.h */
 

⌨️ 快捷键说明

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