123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
167:bedc0a9d559a
Parent:
166:c3c0b8a90d81
Child:
173:7f938afb0447
--- a/DeviceUserProtocolDecoder.c	Sun May 22 18:59:20 2016 +0000
+++ b/DeviceUserProtocolDecoder.c	Sun Jun 05 11:03:33 2016 +0000
@@ -4,7 +4,10 @@
 extern HashParam hashParamTable[HASH_PARAM_COUNT];
 extern HashFunc  hashFuncTable[HASH_FUNC_COUNT];
 
-void InitUserProtocolDecoder(void) {
+void InitUserProtocolDecoderDefaultSettings(void) {
+}
+
+void InitUserProtocolDecoderState(void) {
   device.user.decoder.error = 0;
   device.user.decoder.count = 0;
   device.user.decoder.canceled = 1;
@@ -15,6 +18,9 @@
   device.user.decoder.CRC = 0;
 }
 
+void DeviceStartUserProtocolDecoder(void) {
+}
+
 void DeviceDecodeUserRequests(void) {
   do {
     DecodeStart(); if (device.user.decoder.error) continue;
@@ -480,10 +486,12 @@
     case M0_LDPAR_F:
       DecodeCRC(); if (device.user.decoder.error) return;
       DeviceFlashReadAll();
+      DeviceInitState();
       break;
     case M0_LDPAR_D:
       DecodeCRC(); if (device.user.decoder.error) return;
-      DeviceInitAllWithDefaults();
+      DeviceInitDefaultSettings();
+      DeviceInitState();
       break;
     case M0_START:
       DecodeCRC(); if (device.user.decoder.error) return;