📄 const.h
字号:
/************************************************************************************
* Copyright (c), 2004-2007,西安铭朗电子科技有限责任公司
* All rights reserved.
*
* Http: www.mlarm.com
* Email: mlarm@mlarm.com
*
* File name: Const.h
* Project : ML-F020ICB
* Processor: C8051F020
* Compiler : Keil C51 Compiler
*
* Author: 李林利
* Version: 1.20
* Date: 2007.6.1
* Email: GavinLi@126.com
*
* Description: 本文件是针对 keil C51 环境下对常量和自定义变量的全局说明;
*
* Others: 本文件的的任何定义都不可修改,否则出错!
*
* Function List: none;
*
* History:
* 1. Author: 李林利
* Version: 1.10
* Date: 2007.3.12
* Modification: none
*
* 2. Author: 李林利
* Version: 1.00
* Date: 2004.11.24
* Modification: 建立文件
*
*************************************************************************************/
#ifndef null
#define null 0
#endif
#ifndef false
#define false 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef true
#define true 1
#endif
#ifndef bool
#define bool unsigned char
#endif
// Disable all interrupts
#define DISABLE_INTERRUPTS EA = 0
// Enable all interrupts
#define ENABLE_INTERRUPTS EA = 1
typedef union {
struct
{
unsigned char Type;
unsigned char Index;
} Descriptor;
struct
{
unsigned char c3; // MSB for 8051 Keil C
unsigned char c2;
unsigned char c1;
unsigned char c0; // LSB for 8051 Keil C
} chars;
struct
{
unsigned int i1; // MSW for 8051 keil C
unsigned int i0; // LSW for 8051 Keil C
} ints;
unsigned long u0;
}INT32;
typedef union
{
struct
{
unsigned char c1; // MSB for 8051 Keil C
unsigned char c0; // LSB for 8051 Keil C
} chars;
unsigned int u0;
}INT16;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -