?? datatype.h
字號:
/***************************************************通用數據類型定義***************************************************/#ifndef _DATATYPE_H_#define _DATATYPE_H_#include <pic.h> #ifndef uchar typedef unsigned char byte; #define uchar byte #endif #ifndef schar typedef signed char sbyte; #define schar sbyte #endif #ifndef word typedef unsigned int uint; #define word uint #endif #ifndef ulong typedef unsigned long int ulong; #endif#define TRUE 1#define FALSE 0#define ON 1#define OFF 0#define BIT_TEST( x, y) (( (x) & (1<<(y))) != 0)typedef union { uchar byte; struct { //位0~位7 unsigned b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1; }bits;}ByteTyp;//單字typedef union { uint w; struct{ uchar bl; //低字節 uchar bh; //高字節 }lhbyte;}WORD;//雙字typedef union { ulong dw; struct{ uint dwl; //低字 uint dwh; //高字 }lhword;}DWORD;//四字typedef union { struct{ DWORD fbl; //低2字 DWORD fbh; //高2字 }lhdword; }FWORD;#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -