基本测试OK
This commit is contained in:
parent
9273828134
commit
17747b92ba
|
@ -27,5 +27,5 @@ uint8_t JudgeEncrypt()
|
||||||
// uint32_t key[] = {0x509770ff, 0x29c6b369, 0x4da2c125, IDÖĐźä32Îť}; //
|
// uint32_t key[] = {0x509770ff, 0x29c6b369, 0x4da2c125, IDÖĐźä32Îť}; //
|
||||||
uint32_t key[] = {(K_128 >> 1) ^ (*(uint32_t*)(0x1FFF7590 + 4)), (K_96 >> 2) ^ key[0], (K_64 >>1) ^ (*(uint32_t*)(0x1FFF7590)), (*(uint32_t*)(0x1FFF7590 + 4)) ^ key[0]};
|
uint32_t key[] = {(K_128 >> 1) ^ (*(uint32_t*)(0x1FFF7590 + 4)), (K_96 >> 2) ^ key[0], (K_64 >>1) ^ (*(uint32_t*)(0x1FFF7590)), (*(uint32_t*)(0x1FFF7590 + 4)) ^ key[0]};
|
||||||
tea_decrypt(encryptCode, key);
|
tea_decrypt(encryptCode, key);
|
||||||
return ((*(uint32_t*)(0x1FFF7590)) == encryptCode[0] && (*(uint32_t*)(0x1FFF7590 + 4)) == encryptCode[1]);
|
return ((*(uint32_t*)(0x1FFF7590 + 4)) == encryptCode[0] && (*(uint32_t*)(0x1FFF7590 + 8)) == encryptCode[1]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -890,7 +890,7 @@ static u_int16_t FRT_ReadReg_MaxWave_4(void *pMsg)
|
||||||
*/
|
*/
|
||||||
static u_int16_t FRT_ReadReg_ID_1(void *pMsg)
|
static u_int16_t FRT_ReadReg_ID_1(void *pMsg)
|
||||||
{
|
{
|
||||||
u_int16_t value = ((*(uint32_t*)(0x1FFF7590)) >> 16) & 0x0000FFFF;
|
u_int16_t value = ((*(uint32_t*)(0x1FFF7590 + 4)) >> 16) & 0x0000FFFF;
|
||||||
return FRT_swap_endian_16(value);
|
return FRT_swap_endian_16(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,7 +901,7 @@ static u_int16_t FRT_ReadReg_ID_1(void *pMsg)
|
||||||
*/
|
*/
|
||||||
static u_int16_t FRT_ReadReg_ID_2(void *pMsg)
|
static u_int16_t FRT_ReadReg_ID_2(void *pMsg)
|
||||||
{
|
{
|
||||||
u_int16_t value = (*(uint32_t*)(0x1FFF7590)) & 0x0000FFFF;
|
u_int16_t value = (*(uint32_t*)(0x1FFF7590 + 4)) & 0x0000FFFF;
|
||||||
return FRT_swap_endian_16(value);
|
return FRT_swap_endian_16(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -912,7 +912,7 @@ static u_int16_t FRT_ReadReg_ID_2(void *pMsg)
|
||||||
*/
|
*/
|
||||||
static u_int16_t FRT_ReadReg_ID_3(void *pMsg)
|
static u_int16_t FRT_ReadReg_ID_3(void *pMsg)
|
||||||
{
|
{
|
||||||
u_int16_t value = ((*(uint32_t*)(0x1FFF7590 + 4)) >> 16) & 0x0000FFFF;
|
u_int16_t value = ((*(uint32_t*)(0x1FFF7590 + 8)) >> 16) & 0x0000FFFF;
|
||||||
return FRT_swap_endian_16(value);
|
return FRT_swap_endian_16(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -923,7 +923,7 @@ static u_int16_t FRT_ReadReg_ID_3(void *pMsg)
|
||||||
*/
|
*/
|
||||||
static u_int16_t FRT_ReadReg_ID_4(void *pMsg)
|
static u_int16_t FRT_ReadReg_ID_4(void *pMsg)
|
||||||
{
|
{
|
||||||
u_int16_t value = (*(uint32_t*)(0x1FFF7590 + 4)) & 0x0000FFFF;
|
u_int16_t value = (*(uint32_t*)(0x1FFF7590 + 8)) & 0x0000FFFF;
|
||||||
return FRT_swap_endian_16(value);
|
return FRT_swap_endian_16(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue