From de20270532c995ecba1ada768be855868b44c220 Mon Sep 17 00:00:00 2001 From: tharexde Date: Sat, 20 Jun 2020 14:32:57 +0200 Subject: [PATCH] replaced reply_mix(...) by reply_ng(...) --- armsrc/em4x50.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/armsrc/em4x50.c b/armsrc/em4x50.c index 7b2260ecd..9a3cb818c 100644 --- a/armsrc/em4x50.c +++ b/armsrc/em4x50.c @@ -684,6 +684,7 @@ void em4x50_info(em4x50_data_t *etd) { // otherwise continue without login bool bsuccess = false, blogin = false; + uint8_t status = 0; uint8_t addresses[] = {0x00, 0x00, 0x21, 0x00}; // fwr = 0, lwr = 33 uint8_t password[] = {0x00, 0x00, 0x00, 0x00}; // default password @@ -705,8 +706,10 @@ void em4x50_info(em4x50_data_t *etd) { bsuccess = selective_read(addresses); + status = (bsuccess << 1) + blogin; + lf_finalize(); - reply_mix(CMD_ACK, bsuccess, blogin, 0, (uint8_t *)tag.sectors, 238); + reply_ng(CMD_ACK, status, (uint8_t *)tag.sectors, 238); } // write functions @@ -792,6 +795,7 @@ void em4x50_write(em4x50_data_t *etd) { // single word is written to given address, verified by selective read operation bool bsuccess = false, blogin = false; + uint8_t status = 0; uint8_t word[4] = {0x00, 0x00, 0x00, 0x00}; uint8_t addresses[4] = {0x00, 0x00, 0x00, 0x00}; @@ -834,8 +838,10 @@ void em4x50_write(em4x50_data_t *etd) { } } + status = (bsuccess << 1) + blogin; + lf_finalize(); - reply_mix(CMD_ACK, bsuccess, blogin, 0, (uint8_t *)tag.sectors, 238); + reply_ng(CMD_ACK, status, (uint8_t *)tag.sectors, 238); } void em4x50_write_password(em4x50_data_t *etd) { @@ -853,5 +859,5 @@ void em4x50_write_password(em4x50_data_t *etd) { } lf_finalize(); - reply_mix(CMD_ACK, bsuccess, 0, 0, 0, 0); + reply_ng(CMD_ACK, bsuccess, 0, 0); }