00001 /********************************************************************\ 00002 00003 Name: PowerSwitch.h 00004 $Id: powerswitch.h 734 2009-06-05 23:53:49Z midas $ 00005 00006 \********************************************************************/ 00007 00008 #define N_POWER_CHANNELS 15 00009 #define SST_LINE1 1 00010 00011 // 00012 //--- MSCB structure 00013 struct user_data_type { 00014 // System 00015 unsigned char error; 00016 unsigned char control; 00017 unsigned char status; 00018 float value[15]; 00019 float temperature[6]; 00020 float localtemp[3]; 00021 float limit[6]; 00022 }; 00023 00024 struct user_data_type xdata user_data; 00025 // Global definition 00026 // Global ON / OFF definition 00027 #define ON 1 00028 #define DONE 1 00029 #define SET 1 00030 #define OFF 0 00031 #define CLEAR 0 00032 00033 // Indices for user_write functions 00034 #define IDXCTL 2 00035 00036 // ESR Error Register 00037 unsigned char bdata rESR; 00038 sbit shutdown = rESR ^ 0; //0x1 00039 sbit RdssT = rESR ^ 1; //0x2 00040 sbit temp1 = rESR ^ 2; //0x4 00041 sbit temp2 = rESR ^ 3; //0x8 00042 sbit temp3 = rESR ^ 4; //0x10 00043 sbit temp4 = rESR ^ 5; //0x20 00044 sbit temp5 = rESR ^ 6; //0x40 00045 sbit temp6 = rESR ^ 7; //0x80