英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流
标题:
解释一下这个c语言的数据结构
[打印本页]
作者:
winnie
时间:
2009-4-18 14:37
标题:
解释一下这个c语言的数据结构
typedef union
{
unsigned char Byte;
struct
{
unsigned char _RD: 1;
unsigned char _WR: 1;
unsigned char _A0: 1;
unsigned char _MM: 2;
unsigned char _LCD_E: 1;
unsigned char _MMM: 2;
}Bit;
}UNION_PORT;
typedef union
//类
型定义共用体
{
unsigned char Byte;
// 定
义一个字节
struct
{
unsigned char _RD: 1; 0
unsigned char _WR: 1; 1
unsigned char _A0: 1; 2
unsigned char _MM: 2; 3,4
unsigned char _LCD_E: 1; 5
unsigned char _MMM: 2; 6,7
}Bit;
file://定义8位结
构体BIT
}UNION_PORT;
file://PORT共用体
UNION_PORT
欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/)
Powered by Discuz! X3.2