relocated FpgaDownloadAndGo from em4x50_chk to appmain

This commit is contained in:
tharexde 2020-12-05 23:44:18 +01:00
parent ba963e1187
commit 8fde0ba047
2 changed files with 6 additions and 5 deletions

View file

@ -1141,6 +1141,12 @@ static void PacketReceived(PacketCommandNG *packet) {
break;
}
case CMD_LF_EM4X50_CHK: {
//-----------------------------------------------------------------------------
// Note: we call FpgaDownloadAndGo(FPGA_BITSTREAM_LF) here although FPGA is not
// involved in dealing with emulator memory. But if it is called later, it might
// destroy the Emulator Memory.
//-----------------------------------------------------------------------------
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
em4x50_chk((uint8_t *)packet->data.asBytes);
break;
}

View file

@ -926,11 +926,6 @@ void em4x50_chk(uint8_t *filename) {
uint32_t pwd = 0x0;
#ifdef WITH_FLASH
//-----------------------------------------------------------------------------
// without calling FpgaDownloadAndGo the initial em4x50_chk call doesn't find
// a password (altough the correct password is in the dictionary)
//-----------------------------------------------------------------------------
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
BigBuf_free();