00001 00020 #ifndef _ax10420_types_h_ 00021 #define _ax10420_types_h_ 00022 00027 typedef unsigned tAXMsgType; 00028 typedef unsigned tAXGroup; 00029 typedef unsigned tAXPort; 00030 typedef unsigned tAXIOConfigure; 00031 00032 /* control message types */ 00033 enum {tInit, tSetOutput}; 00034 /* control groups */ 00035 enum {eG1,eG2}; 00036 /* control ports */ 00037 enum {ePA,ePB,ePC}; 00038 /* io directions */ 00039 enum {eOut,eIn}; 00040 00045 typedef struct 00046 { 00047 tAXGroup group; 00048 tAXIOConfigure port_a; 00049 tAXIOConfigure port_b; 00050 tAXIOConfigure port_c_upper; 00051 tAXIOConfigure port_c_lower; 00052 } AX10420_msg_init; 00053 00057 typedef struct 00058 { 00059 tAXGroup group; 00060 tAXPort port; 00061 unsigned value; 00062 } AX10420_msg_setOutput; 00063 00067 typedef struct 00068 { 00069 tAXIOConfigure port1_a; 00070 tAXIOConfigure port1_b; 00071 tAXIOConfigure port1_c; 00072 tAXIOConfigure port2_a; 00073 tAXIOConfigure port2_b; 00074 tAXIOConfigure port2_c; 00075 } AX10420_msg_state; 00076 00080 typedef struct 00081 { 00082 tAXMsgType type; 00083 union 00084 { 00085 AX10420_msg_init msginit; 00086 AX10420_msg_setOutput msgsetoutput; 00087 }; 00088 } AX10420_msg; 00089 00090 00091 00092 #endif /* _ax10420_types_h_ */