Dmitry Kovalev / Mbed 2 deprecated LG2

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
62:2d2dcf999fb5
Parent:
61:1b76fe74a0d9
Child:
63:823c7f1ec6c3
--- a/DeviceProtocol.h	Tue Feb 16 03:00:30 2016 +0000
+++ b/DeviceProtocol.h	Tue Feb 16 18:57:45 2016 +0000
@@ -42,22 +42,30 @@
 
 #define  MAINTENANCE     0x99      //e. the code of the Maintenance mode command //r. код команды Maintenance mode
 #define  M0_MAINTENANCE  0x99      //Maintenance command set version: initial version
-//Basic maintenance commands group
+//Maintenance basic commands group
 #define  M0_BASIC        0xda      //Basic maintenance commands group code
-#define  M0_CLEAR        0x00      //group command select: e. reset of the register of errors of line 485 //r. очистка регистра ошибок линии 485
-#define  M0_MIRROR       0x01      //group command select: e. return previous contents of the receiver buffer //r. возврат предыдущего содержимого буфера приемника  
-#define  M0_LDPAR_F      0x02      //group command select: e. load GLD parameters from Flash-memory //r. загрузить параметры ГЛД из флэш-памяти
-#define  M0_LDPAR_D      0x03      //group command select: e. set GLD parameters by procedure of initialization //r. установить параметры ГЛД процедурой инициализации 
-#define  M0_START        0x04      //group command select: e. switch on the GLD //r. включить ГЛД          
-#define  M0_STOP         0x40      //group command select: e. switch off the GLD //r. выключить ГЛД
-#define  M0_PULSE        0x0a      //group command select: e. generation of the light-up pulse //r. генерация импульса поджига
+#define      M0_CLEAR        0x00      //group command select: e. reset of the register of errors of line 485 //r. очистка регистра ошибок линии 485
+#define      M0_MIRROR       0x01      //group command select: e. return previous contents of the receiver buffer //r. возврат предыдущего содержимого буфера приемника  
+#define      M0_LDPAR_F      0x02      //group command select: e. load GLD parameters from Flash-memory //r. загрузить параметры ГЛД из флэш-памяти
+#define      M0_LDPAR_D      0x03      //group command select: e. set GLD parameters by procedure of initialization //r. установить параметры ГЛД процедурой инициализации 
+#define      M0_START        0x04      //group command select: e. switch on the GLD //r. включить ГЛД          
+#define      M0_STOP         0x40      //group command select: e. switch off the GLD //r. выключить ГЛД
+#define      M0_PULSE        0x0a      //group command select: e. generation of the light-up pulse //r. генерация импульса поджига
+//Maintenance rate commands group
+#define  M0_RATE         0xdd      //e. delivery of a stack of parameters M_Rate (Rate2, Rate3) //r. выдача набора параметров M_Rate  (Rate2, Rate3)
+#define      M0_RATE_0       0x00      //group command select: output parameters set 0?
+#define      M0_RATE_1       0x01      //group command select: output parameters set 1?
+#define      M0_RATE_2       0x02      //group command select: output parameters set 2
+#define      M0_RATE_3       0x03      //group command select: output parameters set 3
+#define      M0_RATE_4       0x04      //group command select: output parameters set 4
+#define      M0_RATE_7       0x07      //group command select: output parameters set 7
+
 //Other maintenance commands
 #define  M0_STIMUL       0x0a      //e. the code of the Stimul command //r. код команды Stimul    
 #define  M0_RESET        0x80      //e. software device reset(restart) //r. программный сброс (рестарт) прибора
 
 #define  M0_CTL_R        0xd9      //e. reading the control register of the device //r. чтение регистра управления устройства  
 #define  M0_CTL_M        0xd8      //e. modification of bit of the control register //r. модификация бита регистра управления 
-#define  M0_RATE         0xdd      //e. delivery of a stack of parameters M_Rate (Rate2, Rate3) //r. выдача набора параметров M_Rate  (Rate2, Rate3)
 
 #define  M0_TMP_W        0xe0      //e. writing to the AD7714 circuit (temperature sensors) //r. запись в схемы AD7714 (измерители температуры) 
 #define  M0_TMP_R        0xe1      //e. reading from the AD7714 circuit (temperature sensors) //r. чтение из схем AD7714 (измерители температуры) 
@@ -84,6 +92,7 @@
   DevModeLatchRS422BINS,     //external latch by RS422 B_Delta_BINS request with B_Delta_BINS format response
   DevModeLatchRequestBINS    //external latch mode with B_Delta_BINS format data and latch pulse request
 } DeviceModes;
+/*
 typedef __packed struct {
     uint8_t SOC;          //Start Of Command: 0xCC
     uint8_t Address;      //Device address: 0x00, 0x01, 0x02, 0x1f
@@ -103,7 +112,7 @@
     uint8_t ChecksumHi;   //Checksum Hi byte
     uint8_t ChecksumLo;   //Checksum Lo byte
 } DeviceModeResponse;
-/*
+
 DeviceMessageCheck DeviceRequestChecks[] = {
    {DMID_DeviceMode, 6, 3, DeviceModeRequestCheck}
 };