Обновление
This commit is contained in:
parent
e7cca765e9
commit
2af548714f
|
|
@ -132,3 +132,20 @@ bool DeviceStorage_Init(tDeviceStorage *env, bool loadParamOnly, tStorageInterfa
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadFromStorageToStatusData(tDeviceStorage *env, ecu_identification_t *ecu) {
|
||||||
|
if (osMutexAcquire(env->dumpObserver.accessDumper, 1000) == osOK) {
|
||||||
|
memcpy(ecu, &env->dataParam->device.identification, sizeof(ecu_identification_t));
|
||||||
|
osMutexRelease(env->dumpObserver.accessDumper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveToStorageFromStatusData(tDeviceStorage *env, ecu_identification_t *ecu) {
|
||||||
|
|
||||||
|
if (osMutexAcquire(env->dumpObserver.accessDumper, 1000) == osOK) {
|
||||||
|
memcpy(&env->dataParam->device.identification, ecu, sizeof(ecu_identification_t));
|
||||||
|
osMutexRelease(env->dumpObserver.accessDumper);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeviceStorageParam_DelayedDump(env);
|
||||||
|
}
|
||||||
|
|
@ -32,4 +32,7 @@ void DeviceStorageCalib_ForceDump(tDeviceStorage *env);
|
||||||
void DeviceStorageParam_ForceDump(tDeviceStorage *env);
|
void DeviceStorageParam_ForceDump(tDeviceStorage *env);
|
||||||
void DeviceStorageParam_DelayedDump(tDeviceStorage *env);
|
void DeviceStorageParam_DelayedDump(tDeviceStorage *env);
|
||||||
|
|
||||||
|
void LoadFromStorageToStatusData(tDeviceStorage *env, ecu_identification_t *ecu);
|
||||||
|
void SaveToStorageFromStatusData(tDeviceStorage *env, ecu_identification_t *ecu);
|
||||||
|
|
||||||
#endif //HVAC_DEVICESTORAGE_H
|
#endif //HVAC_DEVICESTORAGE_H
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue