⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syslogic.h

📁 基于2812dsp/BOIS实时操作系统,通用软件平台
💻 H
字号:
/* =================================================================================
File name:       Syslogic.H                    
                    
Originator:	        R&D
			New Image Electric

-----------*/
#ifndef __Syslogic_H__
#define __Syslogic_H__

#include "DSP281X_device.h"
// 控制字  控制位声明 , 定义该结构体

struct MCW_BITS  {        // bits   description
	    Uint16   rsv0:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   U11_EN:1;	//bit2 		
	    Uint16   RESET:1;		//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   rsv6:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union MCW_REG {
   Uint16             all;
   struct MCW_BITS	  bit;
};


// 状态字  状态位声明 , 定义该结构体
struct MSW_BITS  {        		// bits   description
	    Uint16   RDYON:1;			//BIT0
	    Uint16   CHARGING:1;			//BIT1
	    Uint16   RUNNING:1;		//BIT2
	    Uint16   FAULT:1;			//BIT3
	    Uint16   U11RUN:1;
	    Uint16   RDYRUN:1;
	    Uint16	  ON_INHIBIT:1;		//BIT6
	    Uint16   TEST_OK:1;			//BIT7
	    Uint16   Synchronization:1;			//BIT0
	    Uint16   REM_LOC:1;		//BIT9
	    Uint16   STATUS_MIAN:1;
	    Uint16   DC_V_OK:1;
	    Uint16   rsv12:1; 		//BIT12
	    Uint16   rsv13:1;
	    Uint16   rsv14:1;
	    Uint16   rsv15:1;
	    
};

union MSW_REG {
   Uint16             all;
   struct MSW_BITS	  bit;
};
// 状态字  状态位声明 , 定义该结构体
struct FaultWord_BITS  {        // bits   description
	    Uint16   PDPINT:1;			//BIT0
	    Uint16   OverCurrent:1;		//BIT1
	    Uint16   OverVoltage:1;		//BIT2
		Uint16   UnderVoltage:1;	//bit3
		Uint16	  VoltageAberrance:1;			//bit4
		Uint16	  ExteriorFault :1;			//bit5NISMFault
		Uint16   CommFault:1;				//bit6
		Uint16   ModuleTemperature:1;				//bit7
		Uint16	  GroudFault:1;		//bit8
		Uint16	  FanFault:1;				//bit9
		Uint16	  Usyn:1;				//bi10
		Uint16	  PhaseLack:1;				//bit11
		Uint16	  rsv12:1;  		//bit12
		Uint16	  rsv13:1;				//bit13
		Uint16	  rsv14:1;				//bit14
		Uint16	  rsv15:1;				//bit15
};

union FaultWord_REG {
   Uint16            	 all;
   struct FaultWord_BITS	 bit;
};
struct AlarmWord_BITS  {        // bits   description
	    Uint16   rsv0:1;			//BIT0
	    Uint16   OverCurrent:1;		//BIT1
	    Uint16   OverVoltage:1;		//BIT2
		Uint16   UnderVoltage:1;	//bit3
		Uint16	  rsv4:1;			//bit4
		Uint16	  ExteriorAlarm :1;			//bit5NISMFault
		Uint16   CommAlarm:1;				//bit6
		Uint16   ModuleTemperature:1;				//bit7
		Uint16	  rsv8:1;		//bit8
		Uint16	  rsv9:1;				//bit9
		Uint16	  UsynAlarm:1;				//bi10
		Uint16	  rsv11:1;				//bit11
		Uint16	  LoadCommLost:1;  		//bit12
		Uint16	  rsv13:1;				//bit13
		Uint16	  rsv14:1;				//bit14
		Uint16	  rsv15:1;				//bit15
};

union AlarmWord_REG {
   Uint16            	 all;
   struct AlarmWord_BITS	 bit;
};
/*struct ICW_BITS  {        // bits   description
	    Uint16   ON:1;	//Uint16   ON:1;		//bit0
	    Uint16   rsv1:1;	//bit1
	    Uint16   rsv2:1;	//bit2 		Uint16   RUN:1;		//bit2
	    Uint16   LOC_RUN:1;		//bit3		Uint16   rsv3:1;	//bit3
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   U11_EN:1;	//bit6	
	    Uint16   RESET:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   REM_LOC:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union ICW_REG {
   Uint16             all;
   struct ICW_BITS	  bit;
};
*/
struct PanelCW_BITS  {          // bits   description
	    Uint16   rsv0:1;    //bit0
	    Uint16   rsv1 :1;	//bit1
	    Uint16   rsv2:1;	//bit2 		
	    Uint16   LOC_RUN:1;	//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   U11_EN:1;	//bit6	
	    Uint16   RESET:1;	//bit7
	    Uint16   rsv8:1;	//bit8		
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   REM_LOC:1;	//bit11		
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union PanelCW_REG {
   Uint16             all;
   struct PanelCW_BITS	  bit;
};
struct PCTCW_BITS  {        // bits   description
	    Uint16   rsv0:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   U11_EN:1;	//bit2 		
	    Uint16   RESET:1;	//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   rsv6:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union PCTCW_REG {
   Uint16             all;
   struct PCTCW_BITS	  bit;
};
struct DICW_BITS  {        // bits   description
	    Uint16   Fans_EN:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   R_MAINON:1;	//bit2 		
	    Uint16   F_OUT:1;		//bit3		
	    Uint16   RESET:1;	//bit4	
	    Uint16   ON_admit:1;	//bit5	
	    Uint16   U11_EN:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union DICW_REG {
   Uint16             all;
   struct DICW_BITS	  bit;
};
struct CMu1CW_BITS  {        // bits   description
	    Uint16   rsv0:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   U11_EN:1;	//bit2 		
	    Uint16   RESET:1;		//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   rsv6:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union CMu1CW_REG {
   Uint16             all;
   struct CMu1CW_BITS	  bit;
};
struct CMu2CW_BITS  {        // bits   description
	    Uint16   rsv0:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   U11_EN:1;	//bit2 		
	    Uint16   RESET:1;		//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   rsv6:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union CMu2CW_REG {
   Uint16             all;
   struct CMu2CW_BITS	  bit;
};
struct CMu3CW_BITS  {        // bits   description
	    Uint16   rsv0:1;   //bit0
	    Uint16   RUN :1;	//bit1
	    Uint16   U11_EN:1;	//bit2 		
	    Uint16   RESET:1;		//bit3		
	    Uint16   rsv4:1;	//bit4	
	    Uint16   rsv5:1;	//bit5	
	    Uint16   rsv6:1;	//bit6	
	    Uint16   rsv7:1;	//bit7
	    Uint16   rsv8:1;		//bit8		Uint16   rsv8:1;
        Uint16   rsv9:1;
        Uint16   rsv10:1;
        Uint16   rsv11:1;		//bit11		Uint16   rsv11:1;
        Uint16   rsv12:1;
        Uint16   rsv13:1;
        Uint16   rsv14:1;
        Uint16   rsv15:1;
};

union CMu3CW_REG {
   Uint16             all;
   struct CMu3CW_BITS	  bit;
};





#endif // __STATE_CONTROL_WORD_H__




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -