www.pudn.com > r&s1.10°æ±¾£«Îĵµ.rar > types.h


/* 
=============================================================================== 
| Copyright (C) 2004 RuanHaiShen, All rights reserved. 
| SUMMARY:  
|   Standard types for R&S kernel. 
| 
| DESCRIPTION: 
|   See http://www.01s.org for documentation, latest information, license  
|   and contact details. 
|   email:ruanhaishen@01s.org 
=============================================================================*/ 
#ifndef __TYPES_H__ 
#define __TYPES_H__ 
/*===========================================================================*/ 
 
typedef unsigned __arch_u8  u8; 
typedef   signed __arch_u8  s8; 
typedef unsigned __arch_u16 u16; 
typedef   signed __arch_u16 s16; 
typedef unsigned __arch_u32 u32; 
typedef   signed __arch_u32 s32; 
 
typedef unsigned __arch_u8  bool; 
 
typedef u8  byte; 
typedef u16 word; 
 
#if ARCH_CPU_BITS == 8 
typedef u8      uint; 
typedef s8      sint; 
#elif ARCH_CPU_BITS == 16 
typedef u16     uint; 
typedef s16     sint; 
#elif ARCH_CPU_BITS == 32 
typedef u32     uint; 
typedef s32     sint; 
#endif 
 
 
#ifndef true 
# define true    1 
#endif 
#ifndef false 
# define false   0 
#endif 
#ifndef NULL 
# define NULL    0 
#endif 
 
typedef void* arg_t; 
typedef void (*entry_t)(arg_t); 
 
typedef sint    err_t; 
typedef u32     mmsz_t; 
typedef u16     tick_t; 
 
#ifndef __arch_sp 
# define __arch_sp byte* 
#endif 
typedef __arch_sp  sp_t; 
 
#if CFG_SEM_EN == 1 
typedef u16     cnt_t; 
#elif CFG_SEM_EN == 2 
typedef u8      cnt_t; 
#endif 
 
/*===========================================================================*/ 
#endif