📄 global.h
字号:
#ifndef _GLOBAL_DEFINE
#define _GLOBAL_DEFINE
#define LOW 0 //高电平逻辑值
#define HIGH 1 //低电平逻辑值
#define FALSE 0 //逻辑假值
#define TRUE 1 //逻辑真值
//置位操作
#define SET_BIT_0(X) X=X|0x01
#define SET_BIT_1(X) X=X|0x02
#define SET_BIT_2(X) X=X|0x04
#define SET_BIT_3(X) X=X|0x08
#define SET_BIT_4(X) X=X|0x10
#define SET_BIT_5(X) X=X|0x20
#define SET_BIT_6(X) X=X|0x40
#define SET_BIT_7(X) X=X|0x80
//清零操作
#define CLEAR_BIT_0(X) X=X&0xfe
#define CLEAR_BIT_1(X) X=X&0xfd
#define CLEAR_BIT_2(X) X=X&0xfb
#define CLEAR_BIT_3(X) X=X&0xe7
#define CLEAR_BIT_4(X) X=X&0xef
#define CLEAR_BIT_5(X) X=X&0xdf
#define CLEAR_BIT_6(X) X=X&0xbf
#define CLEAR_BIT_7(X) X=X&0x7f
//#define DISK_SECTOR_SIZE 32
//数据类型定义
#ifndef _TYPE_DEFINE
#define _TYPE_DEFINE
typedef bit BOOL;
typedef unsigned char BYTE;
typedef unsigned char CHAR;
typedef unsigned int WORD;
typedef unsigned long DWORD;
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -