Remove strange CMD_052D (and save 148 bytes)
This commit is contained in:
13
app/uart.c
13
app/uart.c
@@ -210,13 +210,9 @@ static void SendVersion(void)
|
||||
SendReply(&Reply, sizeof(Reply));
|
||||
}
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
static bool IsBadChallenge(const uint32_t *pKey, const uint32_t *pIn, const uint32_t *pResponse)
|
||||
{
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
UNUSED(pKey);
|
||||
UNUSED(pIn);
|
||||
UNUSED(pResponse);
|
||||
#else
|
||||
unsigned int i;
|
||||
uint32_t IV[4];
|
||||
|
||||
@@ -230,9 +226,10 @@ static bool IsBadChallenge(const uint32_t *pKey, const uint32_t *pIn, const uint
|
||||
for (i = 0; i < 4; i++)
|
||||
if (IV[i] != pResponse[i])
|
||||
return true;
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// session init, sends back version info and state
|
||||
// timestamp is a session id really
|
||||
@@ -360,6 +357,7 @@ static void CMD_0529(void)
|
||||
SendReply(&Reply, sizeof(Reply));
|
||||
}
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
static void CMD_052D(const uint8_t *pBuffer)
|
||||
{
|
||||
const CMD_052D_t *pCmd = (const CMD_052D_t *)pBuffer;
|
||||
@@ -400,6 +398,7 @@ static void CMD_052D(const uint8_t *pBuffer)
|
||||
|
||||
SendReply(&Reply, sizeof(Reply));
|
||||
}
|
||||
#endif
|
||||
|
||||
// session init, sends back version info and state
|
||||
// timestamp is a session id really
|
||||
@@ -601,9 +600,11 @@ void UART_HandleCommand(void)
|
||||
CMD_0529();
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case 0x052D:
|
||||
CMD_052D(UART_Command.Buffer);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 0x052F:
|
||||
CMD_052F(UART_Command.Buffer);
|
||||
|
@@ -329,6 +329,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
// 0F30..0F3F
|
||||
EEPROM_ReadBuffer(0x0F30, gCustomAesKey, sizeof(gCustomAesKey));
|
||||
bHasCustomAesKey = false;
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(gCustomAesKey); i++)
|
||||
{
|
||||
if (gCustomAesKey[i] != 0xFFFFFFFFu)
|
||||
@@ -337,6 +338,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
// 1FF0..0x1FF7
|
||||
|
Reference in New Issue
Block a user