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

📄 soft_define.h

📁 ARM7 based on STR71x, UCOS migration
💻 H
字号:
/*
 *****************************************************************************
 *                                                                           *
 *  2.4GHz Spread Spectrum PurpleTooth Wireless Modem WT24 Series            *
 *                                                                           *
 *  Copyright (C) 2001-2002 REnex Technology Limited.  All rights reserved.  *
 *  No part of this document may be reproduced or utilized in any form or by *
 *  any means, electronic or mechanical, including photocopying and microfilm*
 *  , without permission in writing from REnex Technology Limited.           *
 *                                                                           *
 *****************************************************************************
 *                                                                           *
 *  Filename:   SoftDef.h                                                    *
 *  Date:       AUG 1, 2004                                                  *
 *  Description:Software platform common definitions                         *
 *  Version:    WM02/V2.00                                                   *
 *  Hardware:   WM0114/WM0120/WM0130/WM0131/WM0140/WM0141/WM0144             *
 *  Remarks:                                                                 *
 *                                                                           *
 *****************************************************************************
 */
#ifndef SOFT_DEFINE_H
#define SOFT_DEFINE_H

/*
 ***************************************************
 Section 1 -- ADS V1.1 Compiler Sepcific Definitions
 ***************************************************
 */
/* 1.1 Data type definitions */
//typedef unsigned char      BYTE;		// 1 byte, value: 0 to 255
//typedef signed   char      TEXT;		// 1 byte, value: -128 to 127
//typedef char               CHAR;		// 1 byte
//typedef unsigned short     HWORD;		// 2 bytes, value: 0 to 65535
//typedef unsigned int       WORD;		// 4 bytes, value: 0 to 4294967295
//typedef long long          LONG;		// 8 bytes, value: -4294967295 to 4294967295
//typedef unsigned char      BOOL;		// boolean value, value: 0 or 1
//#define CODE const					// Constant data type qualifier

/* 1.2 Pointer definitions */
typedef unsigned *         GPTR;    /* general pointer to unknown data type */
typedef unsigned char *    BPTR;    /* pointer to byte location             */
typedef char *             CPTR;    /* pointer to char location             */
typedef unsigned short *   HPTR;    /* pointer to half-word location        */
typedef unsigned int *     WPTR;    /* pointer to word location             */

/* 1.3 Pointer to register definitions */
typedef volatile unsigned char *  BREGPTR; /* pointer to 8-bit register     */
typedef volatile unsigned short * HREGPTR; /* pointer to 16-bit register    */
typedef volatile unsigned int *   WREGPTR; /* pointer to 32-bit register    */

/* 1.4 Pointer to function definitions */
typedef void ( *VFPTR )();          /* pointer to function without arguement*/
                                    /* and return value                     */

/* 1.5 Data type size (in byte) definitions */
#define SIZE_BYTE          1
#define SIZE_TEXT          1
#define SIZE_HWORD         2
#define SIZE_WORD          4
#define SIZE_LONG          8
#define SIZE_BOOL          1

#define SIZE_GPTR          4
#define SIZE_BPTR          4
#define SIZE_HPTR          4
#define SIZE_WPTR          4

#define SIZE_BREGPTR       4
#define SIZE_HREGPTR       4
#define SIZE_WREGPTR       4

/* 1.6 Data type size (in bit) definitions */
#define SIZE_BYTE_BIT      8
#define SIZE_TEXT_BIT      8
#define SIZE_HWORD_BIT     16
#define SIZE_WORD_BIT      32
#define SIZE_LONG_BIT      64
#define SIZE_BOOL_BIT      8

/* 1.7 Functional declarations */
#define ISR      __irq           /* Interrupt service routine               */
#define SWI      __swi           /* Software interrupt routine              */

//#define LOCAL    static          /* Local function/variable declaration     */

/*
 ******************************************
 Section 2 -- Standard Constant Definitions
 ******************************************
 */
/* 2.1 Logical pairs */
#define TRUE         1
#define FALSE        0

#define YES          1
#define NO           0

#define SET          1
#define RESET        0

#define ON           1
#define OFF          0

#define SUCCESS      1
#define FAILED       0

/* 2.2 Others */
#define FOREVER      1
#define NULL         0

/*
 ***************************************
 Section 3 -- Standard Marco Definitions
 ***************************************
 */
#define LOBYTE( i )      (( unsigned char ) (  i        & 0xFF ))
#define HIBYTE( i )      (( unsigned char ) (( i >> 8 ) & 0xFF ))
#define LONIBBLE( i )    (  i        & 0x0F )
#define HINIBBLE( i )    (( i >> 4 ) & 0x0F )

#endif                /* End of definitions _INC_SOFTDEF                    */

⌨️ 快捷键说明

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