Обновление
This commit is contained in:
parent
667b66e1ab
commit
5ed08ba0dc
|
|
@ -9,7 +9,7 @@
|
||||||
#include "HVAC_preDefine.h"
|
#include "HVAC_preDefine.h"
|
||||||
|
|
||||||
#define DEVICE_DATA_VERSION_CALIB 0x01
|
#define DEVICE_DATA_VERSION_CALIB 0x01
|
||||||
#define DEVICE_DATA_VERSION_PARAM 0x01
|
#define DEVICE_DATA_VERSION_PARAM 0x02
|
||||||
|
|
||||||
// BCD в двоичное число
|
// BCD в двоичное число
|
||||||
#define bcd_to_binary(bcd) (((bcd >> 4) * 10) + (bcd & 0x0F))
|
#define bcd_to_binary(bcd) (((bcd >> 4) * 10) + (bcd & 0x0F))
|
||||||
|
|
@ -88,6 +88,10 @@ typedef struct {
|
||||||
typedef struct __attribute__ ((packed)) {
|
typedef struct __attribute__ ((packed)) {
|
||||||
uint32_t meta_fw_crc;
|
uint32_t meta_fw_crc;
|
||||||
uint32_t size_fw;
|
uint32_t size_fw;
|
||||||
|
|
||||||
|
uint8_t meta_fw_name_size;
|
||||||
|
char meta_fw_name[9];
|
||||||
|
|
||||||
tInternal_SW_Version internal_SW_Version;
|
tInternal_SW_Version internal_SW_Version;
|
||||||
tFingerprintDev fingerprint;
|
tFingerprintDev fingerprint;
|
||||||
} tFirmwareMetaMap;
|
} tFirmwareMetaMap;
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,9 @@
|
||||||
//
|
//
|
||||||
#include "DataNonVolatatile_Private.h"
|
#include "DataNonVolatatile_Private.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "FirmwareMetadataSection.h"
|
|
||||||
|
|
||||||
void DeviceStorageInitDeviceSettings(tDeviceSettings *env) {
|
void DeviceStorageInitDeviceSettings(tDeviceSettings *env) {
|
||||||
|
|
||||||
tFirmwareMetaMap *firmwareMetaMap_Boot = (tFirmwareMetaMap *) ADR_META_BOOT;
|
|
||||||
tFirmwareMetaMap *firmwareMetaMap_Main = (tFirmwareMetaMap *) ADR_META_MAIN;
|
|
||||||
|
|
||||||
|
|
||||||
memcpy(&env->identification.Internal_SW_Version, &firmwareMetaMap_Main->internal_SW_Version,
|
|
||||||
sizeof(tInternal_SW_Version));
|
|
||||||
|
|
||||||
memcpy(&env->identification.Boot_SW_Fingerprint, &firmwareMetaMap_Boot->fingerprint, sizeof(tFingerprintDev));
|
|
||||||
memcpy(&env->identification.Application_SW_Fingerprint, &firmwareMetaMap_Main->fingerprint, sizeof(tFingerprintDev));
|
|
||||||
|
|
||||||
env->identification.Tester_Fingerprint.year = 0x18;
|
env->identification.Tester_Fingerprint.year = 0x18;
|
||||||
env->identification.Tester_Fingerprint.month = 0x10;
|
env->identification.Tester_Fingerprint.month = 0x10;
|
||||||
env->identification.Tester_Fingerprint.day = 0x16;
|
env->identification.Tester_Fingerprint.day = 0x16;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue