?? lib_def.h
字號:
/*
*********************************************************************************************************
* uC/LIB
* CUSTOM LIBRARY MODULES
*
* (c) Copyright 2004-2011; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international copyright laws.
*
* uC/LIB is provided in source form to registered licensees ONLY. It is
* illegal to distribute this source code to any third party unless you receive
* written permission by an authorized Micrium representative. Knowledge of
* the source code may NOT be used to develop a similar product.
*
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*
* You can contact us at www.micrium.com.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* CORE CUSTOM LIBRARY MODULE
*
* Filename : lib_def.h
* Version : V1.35.00
* Programmer(s) : ITJ
*********************************************************************************************************
* Note(s) : (1) NO compiler-supplied standard library functions are used in library or product software.
*
* (a) ALL standard library functions are implemented in the custom library modules :
*
* (1) \<Custom Library Directory>\lib_*.*
*
* (2) \<Custom Library Directory>\Ports\<cpu>\<compiler>\lib*_a.*
*
* where
* <Custom Library Directory> directory path for custom library software
* <cpu> directory name for specific processor (CPU)
* <compiler> directory name for specific compiler
*
* (b) Product-specific library functions are implemented in individual products.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* MODULE
*********************************************************************************************************
*/
#ifndef LIB_DEF_MODULE_PRESENT
#define LIB_DEF_MODULE_PRESENT
/*$PAGE*/
/*
*********************************************************************************************************
* CUSTOM LIBRARY MODULE VERSION NUMBER
*
* Note(s) : (1) (a) The custom library module software version is denoted as follows :
*
* Vx.yy.zz
*
* where
* V denotes 'Version' label
* x denotes major software version revision number
* yy denotes minor software version revision number
* zz denotes sub-minor software version revision number
*
* (b) The software version label #define is formatted as follows :
*
* ver = x.yyzz * 100 * 100
*
* where
* ver denotes software version number scaled as an integer value
* x.yyzz denotes software version number, where the unscaled integer
* portion denotes the major version number & the unscaled
* fractional portion denotes the (concatenated) minor
* version numbers
*********************************************************************************************************
*/
#define LIB_VERSION 13500u /* See Note #1. */
/*
*********************************************************************************************************
* INCLUDE FILES
*
* Note(s) : (1) The custom library software files are located in the following directories :
*
* (a) \<Custom Library Directory>\lib_*.*
*
* where
* <Custom Library Directory> directory path for custom library software
*
* (2) CPU-configuration software files are located in the following directories :
*
* (a) \<CPU-Compiler Directory>\cpu_*.*
* (b) \<CPU-Compiler Directory>\<cpu>\<compiler>\cpu*.*
*
* where
* <CPU-Compiler Directory> directory path for common CPU-compiler software
* <cpu> directory name for specific processor (CPU)
* <compiler> directory name for specific compiler
*
* (3) Compiler MUST be configured to include as additional include path directories :
*
* (a) '\<Custom Library Directory>\' directory See Note #1a
*
* (b) (1) '\<CPU-Compiler Directory>\' directory See Note #2a
* (2) '\<CPU-Compiler Directory>\<cpu>\<compiler>\' directory See Note #2b
*********************************************************************************************************
*/
#include <cpu.h>
/*$PAGE*/
/*
*********************************************************************************************************
* STANDARD DEFINES
*********************************************************************************************************
*/
/* ----------------- BOOLEAN DEFINES ------------------ */
#define DEF_FALSE 0
#define DEF_TRUE 1
#define DEF_NO 0
#define DEF_YES 1
#define DEF_DISABLED 0
#define DEF_ENABLED 1
#define DEF_INACTIVE 0
#define DEF_ACTIVE 1
#define DEF_INVALID 0
#define DEF_VALID 1
#define DEF_OFF 0
#define DEF_ON 1
#define DEF_CLR 0
#define DEF_SET 1
#define DEF_FAIL 0
#define DEF_OK 1
/* ------------------- BIT DEFINES -------------------- */
#define DEF_BIT_NONE 0x00uL
#define DEF_BIT_00 0x01uL
#define DEF_BIT_01 0x02uL
#define DEF_BIT_02 0x04uL
#define DEF_BIT_03 0x08uL
#define DEF_BIT_04 0x10uL
#define DEF_BIT_05 0x20uL
#define DEF_BIT_06 0x40uL
#define DEF_BIT_07 0x80uL
#define DEF_BIT_08 0x0100uL
#define DEF_BIT_09 0x0200uL
#define DEF_BIT_10 0x0400uL
#define DEF_BIT_11 0x0800uL
#define DEF_BIT_12 0x1000uL
#define DEF_BIT_13 0x2000uL
#define DEF_BIT_14 0x4000uL
#define DEF_BIT_15 0x8000uL
#define DEF_BIT_16 0x00010000uL
#define DEF_BIT_17 0x00020000uL
#define DEF_BIT_18 0x00040000uL
#define DEF_BIT_19 0x00080000uL
#define DEF_BIT_20 0x00100000uL
#define DEF_BIT_21 0x00200000uL
#define DEF_BIT_22 0x00400000uL
#define DEF_BIT_23 0x00800000uL
#define DEF_BIT_24 0x01000000uL
#define DEF_BIT_25 0x02000000uL
#define DEF_BIT_26 0x04000000uL
#define DEF_BIT_27 0x08000000uL
#define DEF_BIT_28 0x10000000uL
#define DEF_BIT_29 0x20000000uL
#define DEF_BIT_30 0x40000000uL
#define DEF_BIT_31 0x80000000uL
/*$PAGE*/
#define DEF_BIT_32 0x0000000100000000uL
#define DEF_BIT_33 0x0000000200000000uL
#define DEF_BIT_34 0x0000000400000000uL
#define DEF_BIT_35 0x0000000800000000uL
#define DEF_BIT_36 0x0000001000000000uL
#define DEF_BIT_37 0x0000002000000000uL
#define DEF_BIT_38 0x0000004000000000uL
#define DEF_BIT_39 0x0000008000000000uL
#define DEF_BIT_40 0x0000010000000000uL
#define DEF_BIT_41 0x0000020000000000uL
#define DEF_BIT_42 0x0000040000000000uL
#define DEF_BIT_43 0x0000080000000000uL
#define DEF_BIT_44 0x0000100000000000uL
#define DEF_BIT_45 0x0000200000000000uL
#define DEF_BIT_46 0x0000400000000000uL
#define DEF_BIT_47 0x0000800000000000uL
#define DEF_BIT_48 0x0001000000000000uL
#define DEF_BIT_49 0x0002000000000000uL
#define DEF_BIT_50 0x0004000000000000uL
#define DEF_BIT_51 0x0008000000000000uL
#define DEF_BIT_52 0x0010000000000000uL
#define DEF_BIT_53 0x0020000000000000uL
#define DEF_BIT_54 0x0040000000000000uL
#define DEF_BIT_55 0x0080000000000000uL
#define DEF_BIT_56 0x0100000000000000uL
#define DEF_BIT_57 0x0200000000000000uL
#define DEF_BIT_58 0x0400000000000000uL
#define DEF_BIT_59 0x0800000000000000uL
#define DEF_BIT_60 0x1000000000000000uL
#define DEF_BIT_61 0x2000000000000000uL
#define DEF_BIT_62 0x4000000000000000uL
#define DEF_BIT_63 0x8000000000000000uL
/* ------------------ OCTET DEFINES ------------------- */
#define DEF_OCTET_NBR_BITS 8
#define DEF_OCTET_MASK 0xFFuL
#define DEF_NIBBLE_NBR_BITS 4
#define DEF_NIBBLE_MASK 0x0FuL
/* --------------- NUMBER BASE DEFINES ---------------- */
#define DEF_NBR_BASE_BIN 2
#define DEF_NBR_BASE_OCT 8
#define DEF_NBR_BASE_DEC 10
#define DEF_NBR_BASE_HEX 16
/*$PAGE*/
/* ----------------- INTEGER DEFINES ------------------ */
#define DEF_INT_08_NBR_BITS 8L
#define DEF_INT_08_MASK 0xFFuL
#define DEF_INT_08U_MIN_VAL 0u
#define DEF_INT_08U_MAX_VAL 255u
#define DEF_INT_08S_MIN_VAL_ONES_CPL (-127)
#define DEF_INT_08S_MAX_VAL_ONES_CPL 127
#define DEF_INT_08S_MIN_VAL (DEF_INT_08S_MIN_VAL_ONES_CPL - 1)
#define DEF_INT_08S_MAX_VAL DEF_INT_08S_MAX_VAL_ONES_CPL
#define DEF_INT_08U_NBR_DIG_MIN 1
#define DEF_INT_08U_NBR_DIG_MAX 3
#define DEF_INT_08S_NBR_DIG_MIN 3
#define DEF_INT_08S_NBR_DIG_MAX 3
#define DEF_INT_16_NBR_BITS 16L
#define DEF_INT_16_MASK 0xFFFFuL
#define DEF_INT_16U_MIN_VAL 0uL
#define DEF_INT_16U_MAX_VAL 65535uL
#define DEF_INT_16S_MIN_VAL_ONES_CPL (-32767L)
#define DEF_INT_16S_MAX_VAL_ONES_CPL 32767L
#define DEF_INT_16S_MIN_VAL (DEF_INT_16S_MIN_VAL_ONES_CPL - 1)
#define DEF_INT_16S_MAX_VAL DEF_INT_16S_MAX_VAL_ONES_CPL
#define DEF_INT_16U_NBR_DIG_MIN 1
#define DEF_INT_16U_NBR_DIG_MAX 5
#define DEF_INT_16S_NBR_DIG_MIN 5
#define DEF_INT_16S_NBR_DIG_MAX 5
#define DEF_INT_32_NBR_BITS 32L
#define DEF_INT_32_MASK 0xFFFFFFFFuL
#define DEF_INT_32U_MIN_VAL 0uL
#define DEF_INT_32U_MAX_VAL 4294967295uL
#define DEF_INT_32S_MIN_VAL_ONES_CPL (-2147483647L)
#define DEF_INT_32S_MAX_VAL_ONES_CPL 2147483647L
#define DEF_INT_32S_MIN_VAL (DEF_INT_32S_MIN_VAL_ONES_CPL - 1)
#define DEF_INT_32S_MAX_VAL DEF_INT_32S_MAX_VAL_ONES_CPL
#define DEF_INT_32U_NBR_DIG_MIN 1
#define DEF_INT_32U_NBR_DIG_MAX 10
#define DEF_INT_32S_NBR_DIG_MIN 10
#define DEF_INT_32S_NBR_DIG_MAX 10
#define DEF_INT_64_NBR_BITS 64L
#define DEF_INT_64_MASK 0xFFFFFFFFFFFFFFFFuL
#define DEF_INT_64U_MIN_VAL 0uL
#define DEF_INT_64U_MAX_VAL 18446744073709551615uL
#define DEF_INT_64S_MIN_VAL_ONES_CPL (-9223372036854775807L)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -