Bsongis/x9d+ 2019 (#6588)

X9D+ 2019 added
This commit is contained in:
Bertrand Songis
2019-07-26 19:18:29 +02:00
committed by GitHub
parent 37e1e0ef33
commit 151827ada5
44 changed files with 704 additions and 321 deletions
+10 -3
View File
@@ -257,6 +257,15 @@ void memswap(void * a, void * b, uint8_t size)
}
}
#if defined(PXX2)
void setDefaultOwnerId()
{
for (uint8_t i = 0; i < PXX2_LEN_REGISTRATION_ID; i++) {
g_eeGeneral.ownerRegistrationID[i] = (cpu_uid[1 + i] & 0x3f) - 26;
}
}
#endif
void generalDefault()
{
memclear(&g_eeGeneral, sizeof(g_eeGeneral));
@@ -326,9 +335,7 @@ void generalDefault()
#endif
#if defined(PXX2)
for (uint8_t i=0; i<PXX2_LEN_REGISTRATION_ID; i++) {
g_eeGeneral.ownerRegistrationID[i] = (cpu_uid[1 + i] & 0x3f) - 26;
}
setDefaultOwnerId();
#endif
g_eeGeneral.chkSum = 0xFFFF;