Обновление
This commit is contained in:
parent
380fb13ae1
commit
1ba257bcc3
|
|
@ -24,18 +24,25 @@ typedef struct __attribute__ ((packed)) {
|
||||||
char tester_serial[9]; // ASCII: "123456789"
|
char tester_serial[9]; // ASCII: "123456789"
|
||||||
} tFingerprint;
|
} tFingerprint;
|
||||||
|
|
||||||
// Packet [4] Byte
|
typedef struct __attribute__ ((packed)) {
|
||||||
//Data Objects:
|
uint8_t ModuleID; // ModuleID
|
||||||
//[0:0] Date year (yy), Unsigned (1Byte)
|
char testerCode[9]; // ASCII: "123456789"
|
||||||
// - 02 – 99
|
uint8_t year; // BCD: 0x18 = 2018 год
|
||||||
//[1:0] Date month (mm), Unsigned (1Byte)
|
uint8_t month; // BCD: 0x10 = октябрь
|
||||||
// - 01 – 12
|
uint8_t day; // BCD: 0x16 = 16 число
|
||||||
//[2:0] Date day (dd), Unsigned (1Byte)
|
} tFingerprintDev;
|
||||||
// - 01-31
|
|
||||||
//[3:0] Revision, Unsigned (1Byte)
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t SW[4];
|
uint8_t year;
|
||||||
uint8_t MBD[4];
|
uint8_t month;
|
||||||
|
uint8_t day;
|
||||||
|
uint8_t revision;
|
||||||
|
} tVersionDateRevision;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
tVersionDateRevision SW;
|
||||||
|
tVersionDateRevision MBD;
|
||||||
} tInternal_SW_Version;
|
} tInternal_SW_Version;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
@ -66,8 +73,8 @@ typedef struct {
|
||||||
tInternal_SW_Version Internal_SW_Version;
|
tInternal_SW_Version Internal_SW_Version;
|
||||||
char Software_classification_identification[15];
|
char Software_classification_identification[15];
|
||||||
tFingerprint Tester_Fingerprint;
|
tFingerprint Tester_Fingerprint;
|
||||||
tFingerprint Boot_SW_Fingerprint;
|
tFingerprintDev Boot_SW_Fingerprint;
|
||||||
tFingerprint Application_SW_Fingerprint;
|
tFingerprintDev Application_SW_Fingerprint;
|
||||||
char Spare_Part_Number[27];
|
char Spare_Part_Number[27];
|
||||||
char Serial_Number[26];
|
char Serial_Number[26];
|
||||||
char Vehicle_Identification[17];
|
char Vehicle_Identification[17];
|
||||||
|
|
@ -82,7 +89,7 @@ typedef struct __attribute__ ((packed)) {
|
||||||
uint32_t meta_fw_crc;
|
uint32_t meta_fw_crc;
|
||||||
uint32_t size_fw;
|
uint32_t size_fw;
|
||||||
tInternal_SW_Version internal_SW_Version;
|
tInternal_SW_Version internal_SW_Version;
|
||||||
tFingerprint fingerprint;
|
tFingerprintDev fingerprint;
|
||||||
} tFirmwareMetaMap;
|
} tFirmwareMetaMap;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ void DeviceStorageInitDeviceSettings(tDeviceSettings *env) {
|
||||||
|
|
||||||
memcpy(&env->identification.Internal_SW_Version, &firmwareMetaMap_Main->internal_SW_Version,
|
memcpy(&env->identification.Internal_SW_Version, &firmwareMetaMap_Main->internal_SW_Version,
|
||||||
sizeof(tInternal_SW_Version));
|
sizeof(tInternal_SW_Version));
|
||||||
memcpy(&env->identification.Boot_SW_Fingerprint, &firmwareMetaMap_Boot->fingerprint, sizeof(tFingerprint));
|
memcpy(&env->identification.Boot_SW_Fingerprint, &firmwareMetaMap_Boot->fingerprint, sizeof(tFingerprintDev));
|
||||||
memcpy(&env->identification.Application_SW_Fingerprint, &firmwareMetaMap_Main->fingerprint, sizeof(tFingerprint));
|
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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue