kf8cc 当前版本未实现 bit 类型,但 kf8cc 可以使用标准 C 的位域来实现 bit操作。
- typedef struct
- {
- unsigned char b0:1;
- unsigned char b1:1;
- unsigned char b2:1;
- unsigned char b3:1;
- unsigned char b4:1;
- unsigned char b5:1;
- unsigned char b6:1;
- unsigned char b7:1;
- }BitStruct;
- BitStruct FlagColumn;
- #define flag0 FlagColumn.b0
- #define flag1 FlagColumn.b1
- #define flag2 FlagColumn.b2
- #define flag3 FlagColumn.b3
- #define flag4 FlagColumn.b4
- #define flag5 FlagColumn.b5
- #define flag6 FlagColumn.b6
- #define flag7 FlagColumn.b7
|