fork

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
0:8ad47e2b6f00
Child:
21:bc8c1cec3da6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Command.h	Sat Jan 30 13:00:39 2016 +0000
@@ -0,0 +1,47 @@
+ extern unsigned int Err;
+ extern unsigned int ParamIn;
+ extern unsigned int Rate_Flag;
+#define  SOC_In	  0xCC			//e. attribute of command  //r. ������� �������
+//#define  SOC_Out	0xDD
+#define  BROADCAST_ADDRESS 0x1f  		//e. the broadcasting address ( shared for 3 GLD ) //r. ����������������� ����� (����� ��� 3-� ���)
+
+
+#define  CMD_DELTA_PS    	0xa000          //e. the code of the B_DeltaPS command //r. ��� ������� B_DeltaPS
+#define  CMD_DELTA_BINS  	0xb000          //e. the code of the B_DeltaBINS command //r. ��� ������� B_DeltaBINS
+#define  CMD_DELTA_SF	  	0xb200          //e. the code of the B_DeltaSF command //r. ��� ������� B_DeltaSF
+#define  CMD_DEV_MODE    	0xA500          //e. the code of the Device_Mode command //r. ��� ������� Device_Mode
+#define  CMD_BIT_MODE    	0xA700          //e. the code of the B.I.T. command //r. ��� ������� B.I.T.(������������ ������������)
+#define  CMD_RATE        	0x0000          //e. the code of the Rate command //r. ��� ������� Rate  
+#define  CMD_DELTA       	0x0f00          //e. the code of the Delta command //r. ��� ������� Delta
+#define  CMD_D_PERIOD_W  	0xf000          //e. the code of the D_Period_W command //r. ��� ������� D_Period_W
+       
+#define  CMD_MAINT       	0x0099         //e. the code of the Maintenance mode command //r. ��� ������� Maintenance mode
+
+#define  SUBCMD_M_STIMUL    0x0a00          //e. the code of the Stimul command //r. ��� ������� Stimul    
+#define  SUBCMD_M_RESET     0x8000          //e. software device reset(restart) //r. ����������� ����� (�������) �������
+#define  SUBCMD_M_CLEAR     0xda00          //e. reset of the register of errors of line 485 //r. ������� �������� ������ ����� 485  
+#define  SUBCMD_M_MIRR      0xda01          //e. return previous contents of the receiver buffer //r. ������� ����������� ����������� ������ ���������  
+#define  SUBCMD_M_LDPAR_F   0xda02          //e. load GLD parameters from Flash-memory //r. ��������� ��������� ��� �� ����-������
+#define  SUBCMD_M_LDPAR_D   0xda03          //e. set GLD parameters by procedure of initialization //r. ���������� ��������� ��� ���������� ������������� 
+#define  SUBCMD_M_START     0xda04          //e. switch on the GLD //r. �������� ���          
+#define  SUBCMD_M_STOP      0xda40          //e. switch off the GLD //r. ��������� ���
+#define  SUBCMD_M_PULSE     0xda0a          //e. generation of the light-up pulse //r. ��������� �������� �������
+                                                                              
+#define  SUBCMD_M_CTL_R     0xd900          //e. reading the control register of the device //r. ������ �������� ���������� ����������  
+#define  SUBCMD_M_CTL_M     0xd800          //e. modification of bit of the control register //r. ����������� ���� �������� ���������� 
+#define  SUBCMD_M_RATE      0xdd00          //e. delivery of a stack of parameters M_Rate (Rate2, Rate3) //r. ������ ������ ���������� M_Rate  (Rate2, Rate3)
+
+#define  SUBCMD_M_TMP_W     0xe000          //e. writing to the AD7714 circuit (temperature sensors) //r. ������ � ����� AD7714 (���������� �����������) 
+#define  SUBCMD_M_TMP_R     0xe100          //e. reading from the AD7714 circuit (temperature sensors) //r. ������ �� ���� AD7714 (���������� �����������) 
+#define  SUBCMD_M_E5R_W     0xe200          //e. writing to the register of a mode of the Elio5 card //r. ������ � ������� ������ ����� Elio5  
+#define  SUBCMD_M_ADC_R     0xe300          //e. reading data from the ADC of the Elio5 card //r. ������ ������ �� ��� ����� Elio5
+#define  SUBCMD_M_VIB_W     0xe400          //e. loading of the oscillation period of the dither drive //r. �������� ������� ��������� ������������  
+#define  SUBCMD_M_CNT_R     0xe500          //e. reading data from the counters of the Elio5 card //r. ������ ������ �� ��������� ����� Elio5
+#define  SUBCMD_M_GPH_W     0xe600          //e. loading gain factors of photodetector channels //r. �������� ������������� �������� ������� �������������  
+#define  SUBCMD_M_FLG_R     0xe700          //e. reading data from the register of input flags  //r. ������ ������ �� �������� ������� ������
+#define  SUBCMD_M_PARAM_W   0xe800          //e. writing working parameter to the data memory //r. ������ �������� ��������� � ������ ������          
+#define  SUBCMD_M_PARAM_R   0xe900          //e. reading working parameter of the GLD from the data memory //r. ������ �������� ��������� GLD �� ������ ������ 
+#define  SUBCMD_M_E5RA_W    0xea00          //e. writing in 1st additional (A) register of a mode of the Elio5 card //r. ������ � 1-�� �������������� (�) ������� ������ ����� Elio5  
+void Read_CMD(void);
+unsigned int Check(char *c, unsigned int Count);
+void CMD_Rate(void);